From: William A. Rowe Jr Date: Wed, 17 Aug 2016 16:24:23 +0000 (+0000) Subject: Renaming this directive to HttpProtocolOptions after discussion on dev@ X-Git-Tag: 2.5.0-alpha~1269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0784b0f7b2943d80bacf50f86dc6e9c93a69dc2;p=apache Renaming this directive to HttpProtocolOptions after discussion on dev@ git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756649 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 2bc11c0471..ae4b4ab0f8 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -1250,10 +1250,10 @@ EnableSendfile On -EnforceHTTPProtocol +HTTPProtocolOptions Modify restrictions on HTTP Request Messages -EnforceHTTPProtocol [Strict|Unsafe] [Allow0.9|Require1.0] -EnforceHTTPProtocol Strict Allow0.9 +HTTPProtocolOptions [Strict|Unsafe] [Allow0.9|Require1.0] +HTTPProtocolOptions Strict Allow0.9 server config virtual host 2.2.32 or 2.4.24 and later @@ -1280,16 +1280,16 @@ EnableSendfile On >§9.5 Response Smuggling call out only two of the potential risks of accepting non-conformant request messages. As of the introduction of this directive, all grammer rules of the specification are enforced in - the Strict operating mode.

+ the default Strict operating mode.

Users are strongly cautioned against toggling the Unsafe mode of operation for these reasons, most especially on outward-facing, publicly accessible server deployments. Reviewing the messages within the - ErrorLog in the info - LogLevel or below can help identify such faulty - requests, along with their origin. Users should pay particular attention - to any 400 responses in the access log for indiciations that these requests - are being correctly rejected.

+ ErrorLog, configured with + LogLevel info level or below, + can help identify such faulty requests along with their origin. + Users should pay particular attention to any 400 responses in the access + log for indiciations that valid requests are unexpectedly rejected.

RFC 2616 §19.6 "Compatibility With Previous Versions" had @@ -1298,7 +1298,7 @@ EnableSendfile On been removed" and offers additional comments in RFC 2616 Appendix A. The Require1.0 option allows - the user to remove support of the Allow0.9 default option's + the user to remove support of the default Allow0.9 option's behavior.

diff --git a/server/core.c b/server/core.c index 5fbb1803ed..a8c9634ef3 100644 --- a/server/core.c +++ b/server/core.c @@ -4011,7 +4011,7 @@ static const char *set_protocols_honor_order(cmd_parms *cmd, void *dummy, return NULL; } -static const char *set_enforce_http_protocol(cmd_parms *cmd, void *dummy, +static const char *set_http_protocol_options(cmd_parms *cmd, void *dummy, const char *arg) { core_server_config *conf = @@ -4030,19 +4030,19 @@ static const char *set_enforce_http_protocol(cmd_parms *cmd, void *dummy, conf->http_conformance |= AP_HTTP_CONFORMANCE_UNSAFE; } else { - return "EnforceHttpProtocol accepts 'Allow0.9' (default), 'Require1.0'," + return "HttpProtocolOptions accepts 'Allow0.9' (default), 'Require1.0'," " 'Unsafe', or 'Strict' (default)"; } if ((conf->http09_enable & AP_HTTP09_ENABLE) && (conf->http09_enable & AP_HTTP09_DISABLE)) { - return "EnforceHttpProtocol 'Allow0.9' and 'Require1.0'" + return "HttpProtocolOptions 'Allow0.9' and 'Require1.0'" " are mutually exclusive"; } if ((conf->http_conformance & AP_HTTP_CONFORMANCE_STRICT) && (conf->http_conformance & AP_HTTP_CONFORMANCE_UNSAFE)) { - return "EnforceHttpProtocol 'Strict' and 'Unsafe'" + return "HttpProtocolOptions 'Strict' and 'Unsafe'" " are mutually exclusive"; } @@ -4684,7 +4684,7 @@ AP_INIT_TAKE1("TraceEnable", set_trace_enable, NULL, RSRC_CONF, "'on' (default), 'off' or 'extended' to trace request body content"), AP_INIT_FLAG("MergeTrailers", set_merge_trailers, NULL, RSRC_CONF, "merge request trailers into request headers or not"), -AP_INIT_ITERATE("EnforceHttpProtocol", set_enforce_http_protocol, NULL, RSRC_CONF, +AP_INIT_ITERATE("HttpProtocolOptions", set_http_protocol_options, NULL, RSRC_CONF, "'Allow0.9' or 'Require1.0' (default) to allow or deny HTTP/0.9; " "'Unsafe' or 'Strict' (default) to process incorrect requests"), AP_INIT_ITERATE("RegisterHttpMethod", set_http_method, NULL, RSRC_CONF,