From: Jim Jagielski Date: Fri, 4 Nov 2016 19:04:05 +0000 (+0000) Subject: Merge r1739201 from trunk: X-Git-Tag: 2.4.24~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b801f07cf2712783295376d82ed5a0ff2f0eba04;p=thirdparty%2Fapache%2Fhttpd.git Merge r1739201 from trunk: http: Respond with "408 Request Timeout" when a timeout occurs while reading the request body. Submitted by: ylavic Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1768079 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index af16fcc6540..042fb0dea7f 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,9 @@ Changes with Apache 2.4.24 than running with the modified XFF but original TCP address. PR 49839/PR 60251 + *) http: Respond with "408 Request Timeout" when a timeout occurs while + reading the request body. [Yann Ylavic] + *) mod_http2: connection shutdown revisited: corrected edge cases on shutting down ongoing streams, changed log warnings to be less noisy when waiting on long running tasks. [Stefan Eissing] diff --git a/STATUS b/STATUS index 1ab3c778329..409a10a0fc2 100644 --- a/STATUS +++ b/STATUS @@ -117,12 +117,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) http: Respond with "408 Request Timeout" when a timeout occurs while - reading the request body. PR 60313. - trunk patch: http://svn.apache.org/r1739201 - 2.4.x patch: http://home.apache.org/~ylavic/patches/httpd-2.4.x-r1739201.patch - (w/o the APR_EGENERAL case added in r1482918, not in 2.4.x) - +1: ylavic, covener, jim PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 88772ecbe92..2bc1fc9f1f8 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -1392,22 +1392,22 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status) { switch (rv) { - case AP_FILTER_ERROR: { + case AP_FILTER_ERROR: return AP_FILTER_ERROR; - } - case APR_ENOSPC: { + + case APR_ENOSPC: return HTTP_REQUEST_ENTITY_TOO_LARGE; - } - case APR_ENOTIMPL: { + + case APR_ENOTIMPL: return HTTP_NOT_IMPLEMENTED; - } - case APR_ETIMEDOUT: { + + case APR_TIMEUP: + case APR_ETIMEDOUT: return HTTP_REQUEST_TIME_OUT; - } - default: { + + default: return status; } - } } /* In HTTP/1.1, any method can have a body. However, most GET handlers