httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1739201 - in /httpd/httpd/trunk: CHANGES modules/http/http_filters.c
Date Thu, 14 Apr 2016 21:41:13 GMT
Author: ylavic
Date: Thu Apr 14 21:41:13 2016
New Revision: 1739201

URL: http://svn.apache.org/viewvc?rev=1739201&view=rev
Log:
http: Respond with "408 Request Timeout" when a timeout occurs while
reading the request body.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http/http_filters.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1739201&r1=1739200&r2=1739201&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Apr 14 21:41:13 2016
@@ -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]
 

Modified: httpd/httpd/trunk/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?rev=1739201&r1=1739200&r2=1739201&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_filters.c (original)
+++ httpd/httpd/trunk/modules/http/http_filters.c Thu Apr 14 21:41:13 2016
@@ -1398,25 +1398,25 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
 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



Mime
View raw message