]> granicus.if.org Git - apache/commitdiff
Return HTTP 504 rather than 503 when a proxy timeout is hit.
authorLuca Toscano <elukey@apache.org>
Fri, 23 Dec 2016 17:34:11 +0000 (17:34 +0000)
committerLuca Toscano <elukey@apache.org>
Fri, 23 Dec 2016 17:34:11 +0000 (17:34 +0000)
Part of the review for PR: 56188

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

CHANGES
modules/proxy/mod_proxy_fcgi.c

diff --git a/CHANGES b/CHANGES
index 92e1c4bdf3c6d7077b00f13e7a0b4345c801629d..6cf0e269f3132f9065b578dd860f58861af91e7a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy_fcgi: Return HTTP 504 rather than 503 in case of proxy timeout.
+     [Luca Toscano]
+
   *) mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
      backend connection, happening with LogLevel trace2 or higher configured,
      or at any log level with compilers not detected as C99 compliant (e.g.
index cf3455c5072618cc5e9ed7beb1ae3189c6e99289..397a1a778265f9bb95867e0b491d7a539bb150bf 100644 (file)
@@ -880,6 +880,9 @@ static int fcgi_do_request(apr_pool_t *p, request_rec *r,
         if (bad_request) {
             return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
         }
+        if (APR_STATUS_IS_TIMEUP(rv)) {
+            return HTTP_GATEWAY_TIME_OUT;
+        }
         return HTTP_SERVICE_UNAVAILABLE;
     }