--- parser3/src/include/pa_request.h 2001/03/13 16:38:22 1.48 +++ parser3/src/include/pa_request.h 2001/03/13 17:54:13 1.50 @@ -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.48 2001/03/13 16:38:22 paf Exp $ + $Id: pa_request.h,v 1.50 2001/03/13 17:54:13 paf Exp $ */ #ifndef PA_REQUEST_H @@ -19,17 +19,6 @@ #include "pa_venv.h" #include "pa_vform.h" -#define UNNAMED_NAME "unnamed" - -#define MAIN_METHOD_NAME "main" -#define AUTO_METHOD_NAME "auto" - -#define ROOT_CLASS_NAME "ROOT" -#define MAIN_CLASS_NAME "MAIN" -#define TABLE_CLASS_NAME "table" -#define ENV_CLASS_NAME "env" -#define FORM_CLASS_NAME "form" - #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS \ const char *source, \ @@ -53,14 +42,19 @@ class Request : public Pooled { friend Temp_lang; public: - Request(Pool& apool); + Request(Pool& apool, + String::Untaint_lang alang, + + char *adocument_root, + char *apage_filespec + ); ~Request() {} // global classes Hash& classes() { return fclasses; } // core request processing - void core(); + char *core(bool& error); void execute(const Array& ops); @@ -80,6 +74,10 @@ public: void write(const String& astring) { wcontext->write(astring, String::Untaint_lang::NO); // write(const) = clean } + void write_no_lang(String& astring) { + // appending, sure of clean string inside + wcontext->write(astring, String::Untaint_lang::NO); + } void write_assign_lang(Value& avalue) { // appending possible string, assigning untaint language @@ -89,6 +87,10 @@ public: // appending possible string, passing language built into string being written wcontext->write(avalue, String::Untaint_lang::PASS_APPENDED); } + void write_no_lang(Value& avalue) { + // appending sure value, no strings inside + wcontext->write(avalue, String::Untaint_lang::NO); + } void fail_if_junction_(bool is, Value& value, const String& method_name, char *msg); @@ -144,8 +146,8 @@ private: // lang manipulation private: // web - const char *document_root; - const char *page_filespec; + const char *fdocument_root; + const char *fpage_filespec; };