--- parser3/src/include/pa_request.h 2026/10/13 16:14:53 1.285 +++ parser3/src/include/pa_request.h 2026/10/22 23:20:42 1.290 @@ -8,7 +8,7 @@ #ifndef PA_REQUEST_H #define PA_REQUEST_H -#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.285 2026/10/13 16:14:53 moko Exp $" +#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.290 2026/10/22 23:20:42 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" @@ -41,10 +42,10 @@ 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; @@ -52,6 +53,7 @@ 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; @@ -168,8 +170,6 @@ public: VMethodFrame* method_frame; Value* rcontext; WContext* wcontext; - /// response untainting lang - String::Language flang; /// current connection SQL_Connection* fconnection; //@} @@ -214,8 +214,11 @@ public: */ 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); + /// ^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 @@ -357,6 +360,8 @@ public: VCookie& cookie; /// $console VConsole& console; + /// inited in httpd mode + WebSocket* websocket; /// classes configured data HashString classes_conf; @@ -414,13 +419,9 @@ private: // execute.C private: // mime types - /// $MAIN:MIME-TYPES + /// @mime-types[] result or $MAIN:MIME-TYPES, built at the first use Table *mime_types; -private: // true if ^response:send[] was used - - bool fheaders_sent; - private: // connection manipulation SQL_Connection* set_connection(SQL_Connection* aconnection) {