Merge r1739201 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 4 Nov 2016 19:04:05 +0000 (19:04 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 4 Nov 2016 19:04:05 +0000 (19:04 +0000)
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

CHANGES
STATUS
modules/http/http_filters.c

diff --git a/CHANGES b/CHANGES
index af16fcc6540d8d28cc83de27d82c72baccc9fef4..042fb0dea7fc570aa5e2ce2b41b08fe78fe44be7 100644 (file)
--- 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 1ab3c778329263cd3b84fbee60d22435443cee15..409a10a0fc27dfc43419c8cf0cf74e0776a0020d 100644 (file)
--- 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:
index 88772ecbe92f2dfd8e4f1b7f81a7021264e6f371..2bc1fc9f1f8fc067d750d197875307ba87cf7dd0 100644 (file)
@@ -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