--- parser3/src/include/pa_request.h 2001/03/24 10:54:45 1.67 +++ parser3/src/include/pa_request.h 2001/04/04 06:16:19 1.76 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.h,v 1.67 2001/03/24 10:54:45 paf Exp $ + $Id: pa_request.h,v 1.76 2001/04/04 06:16:19 paf Exp $ */ #ifndef PA_REQUEST_H @@ -59,6 +59,7 @@ public: const char *content_type; size_t content_length; const char *cookie; + const char *user_agent; }; Request(Pool& apool, @@ -87,7 +88,7 @@ public: /// compiles the file, maybe forcing it's class @a name and @a base_class. VStateless_class *use_file( - const char *file, bool fail_on_read_problem=true, + const String& file_spec, bool fail_on_read_problem=true, const String *name=0, VStateless_class *base_class=0); // core.C /// compiles a @a source buffer @@ -103,7 +104,7 @@ public: /// appending, sure of clean string inside void write_no_lang(const String& astring) { - wcontext->write(astring, String::UL_NO); + wcontext->write(astring, String::UL_CLEAN); } /// appending string, passing language built into string being written void write_pass_lang(const String& astring) { @@ -119,7 +120,7 @@ public: } /// appending sure value, that would be converted to clean string void write_no_lang(Value& avalue) { - wcontext->write(avalue, String::UL_NO); + wcontext->write(avalue, String::UL_CLEAN); } /// appending sure value, not VString void write_expr_result(Value& avalue) { @@ -131,10 +132,10 @@ public: const String& method_name, const char *msg); /// returns relative to @a path path to @a file - char *relative(const char *path, const char *file); + const String& relative(const char *apath, const String& relative_name); /// returns an absolute @a path to relative @a name - char *absolute(const char *name); + const String& absolute(const String& relative_name); public: @@ -154,11 +155,17 @@ public: /// $cookie: VCookie cookie; + /// $MAIN:MIME-TYPES + Table *mime_types; + /// contexts Value *self, *root, *rcontext; /// contexts WContext *wcontext; + /// connection + const String *connection; + private: // core data // classes @@ -190,7 +197,7 @@ private: // lang&raw private: // defaults const String::Untaint_lang fdefault_lang; - Value *fdefault_content_type; + Value *default_content_type; private: // lang manipulation @@ -205,7 +212,7 @@ private: // lang manipulation private: - void output_result(const String& body_string, bool header_only); + void output_result(const VFile& body_file, bool header_only); }; /// Auto-object used for temporary changing Request::flang.