diff options
author | Luca Toscano <elukey@apache.org> | 2016-12-23 18:34:11 +0100 |
---|---|---|
committer | Luca Toscano <elukey@apache.org> | 2016-12-23 18:34:11 +0100 |
commit | ef6fbcf590016247e9ee2fac92148aa2edb0dac4 (patch) | |
tree | fbb4aa496ca725820cf4f9ea6e4677ab1a06a709 | |
parent | On the trunk: update after backport (diff) | |
download | apache2-ef6fbcf590016247e9ee2fac92148aa2edb0dac4.tar.xz apache2-ef6fbcf590016247e9ee2fac92148aa2edb0dac4.zip |
Return HTTP 504 rather than 503 when a proxy timeout is hit.
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
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | modules/proxy/mod_proxy_fcgi.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -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. diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c index cf3455c507..397a1a7782 100644 --- a/modules/proxy/mod_proxy_fcgi.c +++ b/modules/proxy/mod_proxy_fcgi.c @@ -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; } |