--- parser3/src/include/pa_request.h 2001/03/16 12:30:22 1.56 +++ parser3/src/include/pa_request.h 2001/03/18 14:45:26 1.59 @@ -3,7 +3,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.h,v 1.56 2001/03/16 12:30:22 paf Exp $ + $Id: pa_request.h,v 1.59 2001/03/18 14:45:26 paf Exp $ */ #ifndef PA_REQUEST_H @@ -19,6 +19,7 @@ #include "pa_venv.h" #include "pa_vform.h" #include "pa_vrequest.h" +#include "pa_vresponse.h" #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS \ @@ -55,7 +56,7 @@ public: Request(Pool& apool, Info& ainfo, - String::Untaint_lang alang + String::Untaint_lang adefault_lang ); ~Request() {} @@ -63,7 +64,7 @@ public: Hash& classes() { return fclasses; } // core request processing - char *core( + void core(Exception& system_exception, const char *sys_auto_path1, const char *sys_auto_path2); @@ -90,13 +91,17 @@ public: void write_no_lang(String& astring) { wcontext->write(astring, String::Untaint_lang::NO); } + // appending string, passing language built into string being written + void write_pass_lang(String& astring) { + wcontext->write(astring, String::Untaint_lang::PASS_APPEND); + } // appending possible string, assigning untaint language void write_assign_lang(Value& avalue) { wcontext->write(avalue, flang); } // appending possible string, passing language built into string being written void write_pass_lang(Value& avalue) { - wcontext->write(avalue, String::Untaint_lang::PASS_APPENDED); + wcontext->write(avalue, String::Untaint_lang::PASS_APPEND); } // appending sure value, that would be converted to clean string void write_no_lang(Value& avalue) { @@ -118,13 +123,15 @@ public: Info& info; // default base - VClass root_class; + VClass ROOT; // $env:fields here - VEnv env_class; + VEnv env; // $form:elements here - VForm form_class; + VForm form; // $request:elements here - VRequest request_class; + VRequest request; + // $response: + VResponse response; // contexts Value *self, *root, *rcontext; @@ -144,8 +151,10 @@ private: // compile.C private: // execute.C - char *execute_method(Value& aself, const Method& method, bool return_cstr=true); - char *execute_method(Value& aself, const String& method_name, bool return_cstr=true); + const String *execute_method(Value& aself, const Method& method, + bool return_cstr=true); + const String *execute_method(Value& aself, const String& method_name, + bool return_cstr=true); Value *get_element(); @@ -153,6 +162,11 @@ private: // lang&raw String::Untaint_lang flang; +private: // defaults + + const String::Untaint_lang fdefault_lang; + Value *fdefault_content_type; + private: // lang manipulation String::Untaint_lang set_lang(String::Untaint_lang alang) { @@ -164,6 +178,9 @@ private: // lang manipulation flang=alang; } +private: + + void output_result(const String& body_string); }; class Temp_lang {