--- parser3/src/include/pa_request.h 2001/03/14 16:47:29 1.53 +++ parser3/src/include/pa_request.h 2001/03/16 12:30:22 1.56 @@ -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.53 2001/03/14 16:47:29 paf Exp $ + $Id: pa_request.h,v 1.56 2001/03/16 12:30:22 paf Exp $ */ #ifndef PA_REQUEST_H @@ -18,6 +18,7 @@ #include "pa_vobject.h" #include "pa_venv.h" #include "pa_vform.h" +#include "pa_vrequest.h" #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS \ @@ -45,9 +46,9 @@ public: struct Info { const char *document_root; const char *path_translated; - const char *request_method; + const char *method; const char *query_string; - const char *request_uri; + const char *uri; const char *content_type; size_t content_length; }; @@ -81,25 +82,29 @@ public: const String *name=0, bool intercept_string=true); // execute.C + // write(const) = clean void write(const String& astring) { - wcontext->write(astring, String::Untaint_lang::NO); // write(const) = clean + wcontext->write(astring, String::Untaint_lang::NO); } + // appending, sure of clean string inside void write_no_lang(String& astring) { - // appending, sure of clean string inside wcontext->write(astring, String::Untaint_lang::NO); } - + // appending possible string, assigning untaint language void write_assign_lang(Value& avalue) { - // appending possible string, assigning untaint language wcontext->write(avalue, flang); } + // appending possible string, passing language built into string being written void write_pass_lang(Value& avalue) { - // appending possible string, passing language built into string being written wcontext->write(avalue, String::Untaint_lang::PASS_APPENDED); } + // appending sure value, that would be converted to clean string void write_no_lang(Value& avalue) { - // appending sure value, no strings inside - wcontext->write(avalue, String::Untaint_lang::NO); + wcontext->write(avalue, String::Untaint_lang::NO); + } + // appending sure value, not VString + void write_expr_result(Value& avalue) { + wcontext->write(avalue); } void fail_if_junction_(bool is, Value& value, const String& method_name, char *msg); @@ -118,6 +123,8 @@ public: VEnv env_class; // $form:elements here VForm form_class; + // $request:elements here + VRequest request_class; // contexts Value *self, *root, *rcontext; @@ -157,11 +164,6 @@ private: // lang manipulation flang=alang; } -private: // web - - const char *fdocument_root; - const char *fpage_filespec; - }; class Temp_lang {