--- parser3/src/include/pa_request.h 2026/10/05 17:50:18 1.282 +++ parser3/src/include/pa_request.h 2026/10/16 15:16:21 1.289 @@ -8,7 +8,7 @@ #ifndef PA_REQUEST_H #define PA_REQUEST_H -#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.282 2026/10/05 17:50:18 moko Exp $" +#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.289 2026/10/16 15:16:21 moko Exp $" #include "pa_pool.h" #include "pa_hash.h" @@ -16,6 +16,7 @@ #include "pa_wcontext.h" #include "pa_value.h" #include "pa_vhash.h" +#include "pa_vresponse.h" #include "pa_stack.h" #include "pa_request_info.h" #include "pa_request_charsets.h" @@ -37,15 +38,14 @@ const size_t pseudo_file_no__process=1; // forwards -class Temp_lang; class Methoded; class VMethodFrame; class VMail; class VForm; -class VResponse; class VCookie; class VStateless_class; class VConsole; +class WebSocket; class VException; extern int pa_loop_limit; @@ -53,12 +53,12 @@ extern int pa_array_limit; extern int pa_execute_recursion_limit; extern int pa_httpd_timeout; extern size_t pa_file_size_limit; +extern size_t pa_post_max_size; 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; @@ -170,8 +170,6 @@ public: VMethodFrame* method_frame; Value* rcontext; WContext* wcontext; - /// current language - String::Language flang; /// current connection SQL_Connection* fconnection; //@} @@ -214,7 +212,13 @@ 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:stream[part]: the headers go with the first part + void stream(Value& part); + + /// sends headers and sets response.started + void start(VResponse::Started mode); /// executes ops void execute(ArrayOperation& ops); // execute.C @@ -356,6 +360,8 @@ public: VCookie& cookie; /// $console VConsole& console; + /// inited in httpd mode + WebSocket* websocket; /// classes configured data HashString classes_conf; @@ -411,10 +417,6 @@ private: // execute.C Value& get_element4call(Value& ncontext, const String& name); #endif -private: // defaults - - const String::Language fdefault_lang; - private: // mime types /// $MAIN:MIME-TYPES @@ -468,8 +470,6 @@ class Request_context_saver { VMethodFrame* method_frame; Value* rcontext; WContext* wcontext; - /// current language - String::Language flang; /// current connection SQL_Connection* fconnection; @@ -481,13 +481,11 @@ public: method_frame(ar.method_frame), rcontext(ar.rcontext), wcontext(ar.wcontext), - flang(ar.flang), fconnection(ar.fconnection) {} void restore() { fr.stack.set_top_index(stack); fr.anti_endless_execute_recursion=anti_endless_execute_recursion; fr.method_frame=method_frame, fr.rcontext=rcontext; fr.wcontext=wcontext; - fr.flang=flang; fr.fconnection=fconnection; } };