]> granicus.if.org Git - apache/commitdiff
The force-response-1.0 and downgrade-1.0 checks were swapped. This
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 23 Apr 2002 22:15:09 +0000 (22:15 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 23 Apr 2002 22:15:09 +0000 (22:15 +0000)
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

CHANGES
modules/http/http_protocol.c

diff --git a/CHANGES b/CHANGES
index 3ce4413e10b53399dae02a6173ddc2ebc690f19b..27ebbb05c8f850197906822e55bf066b2a92d882 100644 (file)
--- 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 <slamb@slamb.org>]
 
index 363305869c7c661ef6186631d3eb4441afda9262..6299b167b9d88f41a0be3c66c4e404fe6a199a2e 100644 (file)
@@ -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 */