From: Justin Erenkrantz Date: Tue, 23 Apr 2002 22:15:09 +0000 (+0000) Subject: The force-response-1.0 and downgrade-1.0 checks were swapped. This X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f62fd2d72f2ededaeb101fa9548ac1c89db78562;p=apache The force-response-1.0 and downgrade-1.0 checks were swapped. This would mean that downgraded requests were ineligible for force-response checks. Previously, 1.3 would do the downgrade in process_request_internal and then the force-response later on in basic_http_header. PR: 8357 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94771 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3ce4413e10..27ebbb05c8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.36 + *) Swap downgrade-1.0 and force-response-1.0 conditional checks so + that downgraded responses can have force-response. PR 8357. + [Justin Erenkrantz] + *) Fix perchild MPM so that it can be configured with the move to the experimental directory. [Scott Lamb ] diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 363305869c..6299b167b9 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1032,6 +1032,12 @@ static void basic_http_header_check(request_rec *r, r->status_line = status_lines[ap_index_of_response(r->status)]; } + /* Note that we must downgrade before checking for force responses. */ + if (r->proto_num > HTTP_VERSION(1,0) + && apr_table_get(r->subprocess_env, "downgrade-1.0")) { + r->proto_num = HTTP_VERSION(1,0); + } + /* kludge around broken browsers when indicated by force-response-1.0 */ if (r->proto_num == HTTP_VERSION(1,0) @@ -1043,10 +1049,6 @@ static void basic_http_header_check(request_rec *r, *protocol = AP_SERVER_PROTOCOL; } - if (r->proto_num > HTTP_VERSION(1,0) - && apr_table_get(r->subprocess_env, "downgrade-1.0")) { - r->proto_num = HTTP_VERSION(1,0); - } } /* fill "bb" with a barebones/initial HTTP response header */