--- parser3/src/include/pa_request.h 2002/11/20 13:37:23 1.158 +++ parser3/src/include/pa_request.h 2003/01/29 11:06:43 1.160.2.4 @@ -1,14 +1,14 @@ /** @file Parser: request class decl. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_REQUEST_H #define PA_REQUEST_H -static const char* IDENT_REQUEST_H="$Date: 2002/11/20 13:37:23 $"; +static const char* IDENT_REQUEST_H="$Date: 2003/01/29 11:06:43 $"; #include "pa_pool.h" #include "pa_hash.h" @@ -55,6 +55,20 @@ class Temp_lang; class Methoded; class VMethodFrame; +/// some information from web server +class Info { +public: + const char *document_root; + const char *path_translated; + const char *method; + const char *query_string; + const char *uri; + const char *content_type; + size_t content_length; + const char *cookie; + bool mail_received; +}; + /// Main workhorse. class Request : public Pooled { friend class Temp_lang; @@ -63,28 +77,16 @@ class Request : public Pooled { friend class Temp_request_self; public: + Pool& pool() { return fpool; } + #ifdef RESOURCES_DEBUG /// measures double sql_connect_time; double sql_request_time; #endif - /// some information from web server - class Info { - public: - const char *document_root; - const char *path_translated; - const char *method; - const char *query_string; - const char *uri; - const char *content_type; - size_t content_length; - const char *cookie; - bool mail_received; - }; - - Request(Pool& apool, - Info& ainfo, + Request( + Request_info& ainfo, uchar adefault_lang, ///< all tainted data default untainting lang bool status_allowed ///< status class allowed ); @@ -222,9 +224,10 @@ public: public: /// info from web server - Info& info; - /// user's post data - const char *post_data; size_t post_size; + Request_info& info; + + /// source, client, mail charsets + Request_charsets charset_info; /// name of 'main' method const String main_method_name; @@ -253,6 +256,8 @@ public: private: + Pool fpool; + //@{ request processing status /// exception stack trace Stack exception_trace; @@ -351,7 +356,7 @@ private: // connection manipulation private: - void output_result(const VFile& body_file, bool header_only); + void output_result(const VFile& body_file, bool header_only, bool as_attachment); }; /// Auto-object used to save request context across ^try body