--- parser3/src/targets/cgi/parser3.C 2020/12/16 14:51:27 1.337 +++ parser3/src/targets/cgi/parser3.C 2020/12/17 13:44:16 1.339 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.337 2020/12/16 14:51:27 moko Exp $"; +volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.339 2020/12/17 13:44:16 moko Exp $"; #include "pa_config_includes.h" @@ -340,8 +340,10 @@ static void connection_handler(SAPI_Info } catch(const Exception& e) { // exception in connection handling or unhandled exception SAPI::log(info, "%s", e.comment()); const char *status = info.exception_http_status(e.type()); - if(status) + if(*status){ + info.clear_response_headers(); SAPI::send_error(info, e.comment(), status); + } } } @@ -393,6 +395,7 @@ static void httpd_mode() { connection.sock = -1; break; #else +#ifdef HAVE_TLS pthread_t thread; pthread_attr_t attr; pthread_attr_init(&attr); @@ -402,6 +405,7 @@ static void httpd_mode() { throw Exception("httpd.fork", 0, "thread creation failed (%d)", result); connection.sock=-1; break; +#endif case HTTPD_Server::PARALLEL: pid=fork(); if(pid<0)