--- parser3/src/targets/apache/mod_parser3_core.C 2020/10/26 23:15:51 1.28 +++ parser3/src/targets/apache/mod_parser3_core.C 2020/11/16 14:52:19 1.30 @@ -5,7 +5,7 @@ Parser: apache 1.3/2.X module, part, com Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_MOD_PARSER3_CORE_C="$Id: mod_parser3_core.C,v 1.28 2020/10/26 23:15:51 moko Exp $"; +volatile const char * IDENT_MOD_PARSER3_CORE_C="$Id: mod_parser3_core.C,v 1.30 2020/11/16 14:52:19 moko Exp $"; #include "pa_config_includes.h" @@ -93,16 +93,10 @@ struct SAPI_environment_append_info { }; #endif -static const char* mk_env_pair(const char* key, const char* value) { - char *result=new(PointerFreeGC) char[strlen(key)+1/*=*/+strlen(value)+1/*0*/]; - strcpy(result, key); strcat(result, "="); strcat(result, value); - return result; -} - static int SAPI_environment_append(void *d, const char* k, const char* val) { if(k && val) { SAPI_environment_append_info& info=*static_cast(d); - *info.cur++=mk_env_pair(k, val); + *info.cur++=pa_strcat(k, "=", val); } return 1/*true*/; } @@ -204,16 +198,10 @@ static void real_parser_handler(SAPI_Inf request_info.mail_received=false; // prepare to process request - Request request( - SAPI_info, - request_info, - String::Language(String::L_HTML|String::L_OPTIMIZE_BIT) - ); + Request request(SAPI_info, request_info, String::Language(String::L_HTML|String::L_OPTIMIZE_BIT)); // process the request - request.core( - dcfg->parser_config_filespec, true, // /path/to/config - SAPI_info.r->header_only!=0); + request.core(dcfg->parser_config_filespec, SAPI_info.r->header_only!=0); } #ifdef PA_SUPPRESS_SYSTEM_EXCEPTION