mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_proxy: Ensure network errors detected by the proxy are returned as
504 Gateway Timout as opposed to 502 Bad Gateway, in order to be compliant with RFC2616 14.9.4 Cache Revalidation and Reload Controls. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1480058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1374,7 +1374,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
||||
" failed.",
|
||||
backend->hostname, backend->port);
|
||||
}
|
||||
return ap_proxyerror(r, HTTP_BAD_GATEWAY,
|
||||
return ap_proxyerror(r, HTTP_GATEWAY_TIME_OUT,
|
||||
"Error reading from remote server");
|
||||
}
|
||||
/* XXX: Is this a real headers length send from remote? */
|
||||
@@ -1722,7 +1722,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
||||
}
|
||||
else if (rv != APR_SUCCESS) {
|
||||
/* In this case, we are in real trouble because
|
||||
* our backend bailed on us. Pass along a 502 error
|
||||
* our backend bailed on us. Pass along a 504 error
|
||||
* error bucket
|
||||
*/
|
||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01110)
|
||||
|
Reference in New Issue
Block a user