--- parser3/src/include/pa_request.h 2026/10/10 02:01:15 1.283 +++ parser3/src/include/pa_request.h 2026/10/13 16:14:53 1.285 @@ -8,7 +8,7 @@ #ifndef PA_REQUEST_H #define PA_REQUEST_H -#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.283 2026/10/10 02:01:15 moko Exp $" +#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.285 2026/10/13 16:14:53 moko Exp $" #include "pa_pool.h" #include "pa_hash.h" @@ -37,7 +37,6 @@ const size_t pseudo_file_no__process=1; // forwards -class Temp_lang; class Methoded; class VMethodFrame; class VMail; @@ -58,7 +57,6 @@ 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,7 +168,7 @@ public: VMethodFrame* method_frame; Value* rcontext; WContext* wcontext; - /// current language + /// response untainting lang String::Language flang; /// current connection SQL_Connection* fconnection; @@ -216,6 +214,9 @@ 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); + /// executes ops void execute(ArrayOperation& ops); // execute.C @@ -411,15 +412,15 @@ 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 Table *mime_types; +private: // true if ^response:send[] was used + + bool fheaders_sent; + private: // connection manipulation SQL_Connection* set_connection(SQL_Connection* aconnection) { @@ -468,8 +469,6 @@ class Request_context_saver { VMethodFrame* method_frame; Value* rcontext; WContext* wcontext; - /// current language - String::Language flang; /// current connection SQL_Connection* fconnection; @@ -481,13 +480,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; } };