--- parser3/src/targets/cgi/parser3.C 2020/10/14 16:51:46 1.304 +++ parser3/src/targets/cgi/parser3.C 2020/10/28 22:32:02 1.306 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.304 2020/10/14 16:51:46 moko Exp $"; +volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.306 2020/10/28 22:32:02 moko Exp $"; #include "pa_config_includes.h" @@ -154,6 +154,10 @@ char* SAPI::Env::get(SAPI_Info& info, co return info.get_env(name); } +bool SAPI::Env::set(SAPI_Info& info, const char* name, const char* value) { + return info.set_env(name, value); +} + const char* const *SAPI::Env::get(SAPI_Info& info) { return info.get_env(); } @@ -316,9 +320,8 @@ static void connection_handler(SAPI_Info { // initing ::request ptr for signal handlers RequestController rc(&request); - bool fail_on_config_read_problem=locate_config(); // process the request - request.core(config_filespec_cstr, fail_on_config_read_problem, strcasecmp(request_info.method, "HEAD")==0); + request.core(locate_config() ? config_filespec_cstr : NULL, strcasecmp(request_info.method, "HEAD")==0); // clearing ::request in RequestController desctructor to prevent signal handlers from accessing invalid memory } } @@ -453,9 +456,8 @@ static void real_parser_handler(const ch { // initing ::request ptr for signal handlers RequestController rc(&request); - bool fail_on_config_read_problem=locate_config(); // process the request - request.core(config_filespec_cstr, fail_on_config_read_problem, strcasecmp(request_info.method, "HEAD")==0); + request.core(locate_config() ? config_filespec_cstr : NULL, strcasecmp(request_info.method, "HEAD")==0); // clearing ::request in RequestController destructor to prevent signal handlers from accessing invalid memory }