From: Yann Ylavic Date: Thu, 14 Apr 2016 21:41:13 +0000 (+0000) Subject: http: Respond with "408 Request Timeout" when a timeout occurs while X-Git-Tag: 2.5.0-alpha~1737 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c52bb1c1abb3aeba815a87d7c8b1e07d9b7ba79;p=thirdparty%2Fapache%2Fhttpd.git http: Respond with "408 Request Timeout" when a timeout occurs while reading the request body. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1739201 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index fdae3717996..4506788baf7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) http: Respond with "408 Request Timeout" when a timeout occurs while + reading the request body. [Yann Ylavic] + *) scoreboard/status: Keep workers' previous Client, VHost and Request values when idle, like in 2.4.18 and earlier. [Yann Ylavic] diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 254ade31c94..18fc0f79296 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -1398,25 +1398,25 @@ 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_EGENERAL: { + + case APR_EGENERAL: return HTTP_BAD_REQUEST; - } - 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