]> granicus.if.org Git - apache/commitdiff
http: Respond with "408 Request Timeout" when a timeout occurs while
authorYann Ylavic <ylavic@apache.org>
Thu, 14 Apr 2016 21:41:13 +0000 (21:41 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 14 Apr 2016 21:41:13 +0000 (21:41 +0000)
reading the request body.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1739201 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_filters.c

diff --git a/CHANGES b/CHANGES
index fdae37179969f14c03d08135e877ba57b630b69f..4506788baf7cfcc5211ee973164f902f47c05ca4 100644 (file)
--- 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]
 
index 254ade31c94dc96882e073bc7fa140afa1f1c8ed..18fc0f79296a773db1d4eed8b0f8a8fd0b2275d1 100644 (file)
@@ -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