--- parser3/src/main/pa_request.C 2020/12/09 12:37:05 1.401 +++ parser3/src/main/pa_request.C 2020/12/15 12:16:04 1.403 @@ -25,6 +25,7 @@ #include "pa_charset.h" #include "pa_charsets.h" #include "pa_cache_managers.h" +#include "pa_http.h" #include "pa_vmail.h" #include "pa_vform.h" #include "pa_vcookie.h" @@ -33,7 +34,7 @@ #include "pa_vconsole.h" #include "pa_vdate.h" -volatile const char * IDENT_PA_REQUEST_C="$Id: pa_request.C,v 1.401 2020/12/09 12:37:05 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.403 2020/12/15 12:16:04 moko Exp $" IDENT_PA_REQUEST_H IDENT_PA_REQUEST_CHARSETS_H IDENT_PA_REQUEST_INFO_H IDENT_PA_VCONSOLE_H; // consts @@ -103,6 +104,7 @@ static const String file_size_limit_name static const String lock_wait_timeout_name("lock_wait_timeout"); static const String httpd_name("HTTPD"); static const String httpd_timeout_name("timeout"); +static const String httpd_mode_name("mode"); static const String conf_method_name("conf"); static const String post_process_method_name("postprocess"); @@ -328,6 +330,13 @@ void Request::configure_admin(VStateless if(pa_httpd_timeout==0) pa_httpd_timeout=INT_MAX; }, "HTTPD.%s must be int"); + if(httpd) + if(Value* option=httpd->get_element( httpd_mode_name)) { + if(option->get_junction()) + throw Exception(PARSER_RUNTIME, 0, "$main:HTTPD:mode must be string"); + HTTPD_Server::set_mode(option->as_string()); + } + // configure method_frame options // until someone with less privileges have overriden them methoded_array().configure_admin(*this);