1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

mod_proxy_{http,ajp,fcgi}}: don't reuse backend connections with data available

before the request is sent.  PR 57832.

ap_proxy_check_backend() can be used before ap_proxy_connect_backend() to try
to read available data (including from the filters), and is called by
ap_proxy_connect_backend() to check the socket state only (as before, still
relevant after ap_proxy_check_backend() due to filter data which may not have
triggered a real socket operation).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750392 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yann Ylavic
2016-06-27 17:26:12 +00:00
parent 4ddbed1baf
commit d4aa6476b2
8 changed files with 96 additions and 25 deletions

View File

@@ -2073,6 +2073,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
}
/* Step Two: Make the Connection */
ap_proxy_check_backend(proxy_function, backend, r->server, 1);
if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01114)
"HTTP: failed to make connection to backend: %s",