summaryrefslogtreecommitdiff
path: root/modules/proxy
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2010-11-07 18:54:44 +0000
committerJeff Trawick <trawick@apache.org>2010-11-07 18:54:44 +0000
commita1a3d3820c4a98fb4fdad8e6e388b9cc2f7ebb06 (patch)
tree103780a8b2bbae51ac39f9d187ac41cebdf99ea8 /modules/proxy
parent025b065a4f1722b6080f265e68313cb03173510d (diff)
downloadhttpd-a1a3d3820c4a98fb4fdad8e6e388b9cc2f7ebb06.tar.gz
mark connection for close after the return from
ap_proxy_determine_connection() before this revision: if there was an existing connection, ap_proxy_determine_connection() would close it but then clear the close flag, so it didn't get closed by ap_proxy_release_connection() thus, if this child process doesn't use the connection for a while, the application could be stuck in read() for the same while after: ap_proxy_release_connection() will close it after the request completes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032345 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/mod_proxy_fcgi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c
index a89bc85a4e..457ad9b1bd 100644
--- a/modules/proxy/mod_proxy_fcgi.c
+++ b/modules/proxy/mod_proxy_fcgi.c
@@ -961,13 +961,6 @@ static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
backend->is_ssl = 0;
- /* XXX Setting close to 0 is a great way to end up with
- * timeouts at this point, since we lack good ways to manage the
- * back end fastcgi processes. This should be revisited when we
- * have a better story on that part of things. */
-
- backend->close = 1;
-
/* Step One: Determine Who To Connect To */
status = ap_proxy_determine_connection(p, r, conf, worker, backend,
uri, &url, proxyname, proxyport,
@@ -977,6 +970,12 @@ static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
goto cleanup;
}
+ /* XXX Setting close to 0 is a great way to end up with
+ * timeouts at this point, since we lack good ways to manage the
+ * back end fastcgi processes. This should be revisited when we
+ * have a better story on that part of things. */
+ backend->close = 1;
+
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(FCGI_SCHEME, backend, worker, r->server)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
@@ -991,7 +990,6 @@ static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
server_portstr);
cleanup:
- /* Do not close the socket */
ap_proxy_release_connection(FCGI_SCHEME, backend, r->server);
return status;
}