--- parser3/src/include/pa_request.h 2026/09/26 17:41:10 1.276 +++ parser3/src/include/pa_request.h 2026/10/13 20:02:00 1.286 @@ -8,10 +8,11 @@ #ifndef PA_REQUEST_H #define PA_REQUEST_H -#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.276 2026/09/26 17:41:10 moko Exp $" +#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.286 2026/10/13 20:02:00 moko Exp $" #include "pa_pool.h" #include "pa_hash.h" +#include "pa_file.h" #include "pa_wcontext.h" #include "pa_value.h" #include "pa_vhash.h" @@ -36,7 +37,6 @@ const size_t pseudo_file_no__process=1; // forwards -class Temp_lang; class Methoded; class VMethodFrame; class VMail; @@ -53,9 +53,10 @@ extern int pa_execute_recursion_limit; extern int pa_httpd_timeout; extern size_t pa_file_size_limit; +class Code_cache; + /// Main workhorse. class Request: public PA_Object { - friend class Temp_lang; friend class Temp_connection; friend class Temp_request_self; friend class Temp_value_element; @@ -63,6 +64,7 @@ class Request: public PA_Object { friend class Request_context_saver; friend class Exception_trace; friend class VException; + friend class Code_cache_manager; public: class Trace { @@ -166,8 +168,6 @@ public: VMethodFrame* method_frame; Value* rcontext; WContext* wcontext; - /// current language - String::Language flang; /// current connection SQL_Connection* fconnection; //@} @@ -210,7 +210,10 @@ public: core request processing BEWARE: may throw exception to you: catch it! */ - void core(const char* config_filespec, bool header_only, const String& amain_method_name = main_method_name, const String* amain_class_name = NULL); + void core(const char* config_filespec, const String& amain_method_name = main_method_name, const String* amain_class_name = NULL); + + /// ^response:send[part]: the headers go with the first part, the result of @main or exception is not sent then + void send(Value& part); /// executes ops void execute(ArrayOperation& ops); // execute.C @@ -251,6 +254,12 @@ public: anti_endless_execute_recursion--; } + /// take the recovery reserve back if recursion limit is far enough + void recursion_limit_try_restore() { + if(execute_recursion_limit>pa_execute_recursion_limit && anti_endless_execute_recursion