]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Partial port of proposed r1773158 for httpd-2.x only; this change causes all
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 7 Dec 2016 23:01:32 +0000 (23:01 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 7 Dec 2016 23:01:32 +0000 (23:01 +0000)
illegible protocol args to be rejected, irrespective of the strict toggle as
we expect this to occur with a garbage raw SP embedded in the request URI.

Simplifies the code using the protocol 0.9 sentinal to set up an http/1.0
error response.

String duplication of r1773158 is uninteresting, httpd-2.x has a const protocol
member.

Submitted by: rpluem, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1773159 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index c5fa8cf85622db9c3a7522e18dd1e2c53629079d..410da0f14199a8f9a70473d20ddae885eb158a59 100644 (file)
@@ -782,13 +782,10 @@ rrl_done:
             memcpy((char*)r->protocol, "HTTP", 4);
     }
     else if (r->protocol[0]) {
-        r->assbackwards = 0;
-        r->proto_num = HTTP_VERSION(1,0);
+        r->proto_num = HTTP_VERSION(0,9);
         /* Defer setting the r->protocol string till error msg is composed */
-        if (strict && deferred_error == rrl_none)
+        if (deferred_error == rrl_none)
             deferred_error = rrl_badprotocol;
-        else
-            r->protocol  = "HTTP/1.0";
     }
     else {
         r->assbackwards = 1;