--- parser3/src/main/pa_request.C 2015/09/22 23:38:59 1.346 +++ parser3/src/main/pa_request.C 2015/10/20 18:17:19 1.348 @@ -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.346 2015/09/22 23:38:59 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.348 2015/10/20 18:17:19 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; // consts @@ -43,7 +43,6 @@ const char* UNHANDLED_EXCEPTION_CONTENT_ /// content type of response when no $MAIN:defaults.content-type defined const char* DEFAULT_CONTENT_TYPE="text/html"; -const char* ORIGINS_CONTENT_TYPE="text/plain"; // defines for globals @@ -70,7 +69,6 @@ const String exception_handled_part_name #define CHARSETS_NAME "CHARSETS" #define MIME_TYPES_NAME "MIME-TYPES" #define STRICT_VARS_NAME "STRICT-VARS" -#define ORIGINS_MODE_NAME "ORIGINS" #define CONF_METHOD_NAME "conf" #define POST_PROCESS_METHOD_NAME "postprocess" #define CLASS_PATH_NAME "CLASS_PATH" @@ -85,7 +83,6 @@ static const String charsets_name(CHARSE static const String main_class_name(MAIN_CLASS_NAME); static const String mime_types_name(MIME_TYPES_NAME); static const String strict_vars_name(STRICT_VARS_NAME); -static const String origins_mode_name(ORIGINS_MODE_NAME); static const String conf_method_name(CONF_METHOD_NAME); static const String post_process_method_name(POST_PROCESS_METHOD_NAME); static const String class_path_name(CLASS_PATH_NAME); @@ -149,8 +146,8 @@ Request::Request(SAPI_Info& asapi_info, pa_register_thread_request(*this); // file_no=0 => unknown - file_list+=String::Body("UNKNOWN"); - file_list+=String::Body("-body of process-"); // pseudo_file_no__process + file_list+="UNKNOWN"; + file_list+="-body of process-"; // pseudo_file_no__process // maybe expire old caches cache_managers->maybe_expire(); @@ -164,15 +161,15 @@ Request::Request(SAPI_Info& asapi_info, /// methodless // env class - classes().put(String::Body(ENV_CLASS_NAME), new VEnv(asapi_info)); + classes().put(ENV_CLASS_NAME, new VEnv(asapi_info)); // status class - classes().put(String::Body(STATUS_CLASS_NAME), new VStatus()); + classes().put(STATUS_CLASS_NAME, new VStatus()); // request class - classes().put(String::Body(REQUEST_CLASS_NAME), new VRequest(arequest_info, charsets, form, asapi_info)); + classes().put(REQUEST_CLASS_NAME, new VRequest(arequest_info, charsets, form, asapi_info)); // cookie class - classes().put(String::Body(COOKIE_CLASS_NAME), &cookie); + classes().put(COOKIE_CLASS_NAME, &cookie); // console class - classes().put(String::Body(CONSOLE_CLASS_NAME), &console); + classes().put(CONSOLE_CLASS_NAME, &console); /// methoded // response class classes().put(response.get_class()->name(), &response); @@ -977,10 +974,9 @@ Request::Exception_details Request::get_ // $.file lineno colno if(trace) { const Operation::Origin origin=trace.origin(); - hash.put(String::Body("file"), - new VString(*new String(file_list[origin.file_no], String::L_TAINTED))); - hash.put(String::Body("lineno"), new VInt(1+origin.line)); - hash.put(String::Body("colno"), new VInt(1+origin.col)); + hash.put("file", new VString(*new String(file_list[origin.file_no], String::L_TAINTED))); + hash.put("lineno", new VInt(1+origin.line)); + hash.put("colno", new VInt(1+origin.col)); } // $.comment