commit 5fd8847bb194db6e87a7c10df349a12e66d17855 Author: Michael Osipov Date: 2019-08-05 12:39:28 +0200 BZ 63626: mod_proxy_http uses incorrect status codes for timed out upstream requests If a status is known to time out at some point, use HTTP_GATEWAY_TIME_OUT rather than HTTP_BAD_GATEWAY because we know that the connection has been established and the upstream server has received our request. diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index c5e1777623..2aadd7c489 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1307,7 +1307,9 @@ int ap_proxy_http_process_response(proxy_http_req_t *req) backend->hostname, backend->port); } proxy_run_detach_backend(r, backend); - return ap_proxyerror(r, HTTP_GATEWAY_TIME_OUT, + return ap_proxyerror(r, APR_STATUS_IS_TIMEUP(rc) + ? HTTP_GATEWAY_TIME_OUT + : HTTP_BAD_GATEWAY, "Error reading from remote server"); } /* XXX: Is this a real headers length send from remote? */