--- parser3/src/main/pa_request.C 2013/10/21 20:49:21 1.337 +++ parser3/src/main/pa_request.C 2015/04/02 22:18:26 1.340 @@ -32,7 +32,7 @@ #include "pa_vconsole.h" #include "pa_vdate.h" -volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.337 2013/10/21 20:49:21 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; +volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.340 2015/04/02 22:18:26 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; // consts @@ -156,7 +156,7 @@ Request::Request(SAPI_Info& asapi_info, // status class classes().put(String::Body(STATUS_CLASS_NAME), new VStatus()); // request class - classes().put(String::Body(REQUEST_CLASS_NAME), new VRequest(arequest_info, charsets, form)); + classes().put(String::Body(REQUEST_CLASS_NAME), new VRequest(arequest_info, charsets, form, asapi_info)); // cookie class classes().put(String::Body(COOKIE_CLASS_NAME), &cookie); // console class @@ -327,9 +327,6 @@ void Request::configure() { */ void Request::core(const char* config_filespec, bool config_fail_on_read_problem, bool header_only) { try { - // filling mail received - mail.fill_received(*this); - // loading config if(config_filespec) { const String& filespec=*new String(config_filespec); @@ -339,6 +336,9 @@ void Request::core(const char* config_fi true /*file must exist if 'fail on read problem' not set*/); } + // filling mail received + mail.fill_received(*this); + // loading auto.p files from document_root/.. // to the one beside requested file. // all assigned bases from upper dir @@ -385,7 +385,7 @@ void Request::core(const char* config_fi if(!body_string) throw Exception(PARSER_RUNTIME, 0, - "'"MAIN_METHOD_NAME"' method not found"); + "'" MAIN_METHOD_NAME "' method not found"); // extract response body Value* body_value=response.fields().get(download_name); // $response:download? @@ -737,7 +737,7 @@ static void output_pieces(Request& r, const size_t BUFSIZE = 10*0x400; char buf[BUFSIZE]; - const char *range = SAPI::get_env(r.sapi_info, "HTTP_RANGE"); + const char *range = SAPI::Env::get(r.sapi_info, "HTTP_RANGE"); size_t offset=0; size_t part_length=content_length; if(range){