From: William A. Rowe Jr Date: Wed, 7 Dec 2016 23:01:32 +0000 (+0000) Subject: Partial port of proposed r1773158 for httpd-2.x only; this change causes all X-Git-Tag: 2.5.0-alpha~939 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b69370fcf758aaddf15e1b395539a8f4e2f5716;p=thirdparty%2Fapache%2Fhttpd.git Partial port of proposed r1773158 for httpd-2.x only; this change causes all 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 --- diff --git a/server/protocol.c b/server/protocol.c index c5fa8cf8562..410da0f1419 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -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;