From: Jim Jagielski Date: Thu, 11 Feb 2016 19:05:07 +0000 (+0000) Subject: Merge r1727544 from trunk: X-Git-Tag: 2.4.19~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89db7906e4a88e3ec8183f94cb54c77c66037007;p=thirdparty%2Fapache%2Fhttpd.git Merge r1727544 from trunk: * Ensure that proto_num and protocol is set in another "error out early" edge case. This can happen with invalid CONNECT requests as described in the PR. PR: 58929 Submitted by: rpluem Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1729875 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 68950ad537b..3a0193825ab 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.4.19 + *) core: Prevent a server crash in case of an invalid CONNECT request with + a custom error page for status code 400 that uses server side includes. + PR 58929 [Ruediger Pluem] + *) mod_ssl: handle TIMEOUT on empty SSL input as non-fatal, returning APR_TIMEUP and preserving connection state for later retry. [Stefan Eissing] diff --git a/STATUS b/STATUS index b69018fa8eb..3f28ae73a6f 100644 --- a/STATUS +++ b/STATUS @@ -112,15 +112,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) core: Prevent a server crash in case of an invalid CONNECT request with - a custom error page for status code 400 that uses server side includes. - PR 58929 - Trunk version of patch: - http://svn.apache.org/r1727544 - Backport version for 2.4.x of patch: - Trunk version of patch works modulo CHANGES - +1: rpluem, covener, ylavic - *) core: Add expression support to SetHandler (someone wanted this in a well-articulated serverfault post). trunk patch: http://svn.apache.org/r1725149 diff --git a/server/protocol.c b/server/protocol.c index 86f2f5e7184..817cd3e1267 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -638,6 +638,8 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb) ap_parse_uri(r, uri); if (r->status != HTTP_OK) { + r->proto_num = HTTP_VERSION(1,0); + r->protocol = apr_pstrdup(r->pool, "HTTP/1.0"); return 0; }