You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2005/10/06 23:31:03 UTC
svn commit: r306900 - in /httpd/httpd/branches/2.2.x: CHANGES
modules/proxy/mod_proxy.c
Author: rpluem
Date: Thu Oct 6 14:30:58 2005
New Revision: 306900
URL: http://svn.apache.org/viewcvs?rev=306900&view=rev
Log:
Merge r293123, r293293 from trunk:
* run the request_status hook in proxy_handler if HTTP_SERVICE_UNAVAILABLE
is returned by ap_proxy_pre_request.
Suggested by: Brian Akins <brian.akins turner.com>, Mladen Turk
Reviewed by: Jim Jagielski
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/CHANGES?rev=306900&r1=306899&r2=306900&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Oct 6 14:30:58 2005
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.1.9
+ *) mod_proxy: Run the request_status hook also if there are no free workers
+ or all workers are in error state.
+ [Ruediger Pluem, Brian Akins <brian.akins turner.com>]
+
*) mod_proxy_connect: Fix high CPU loop on systems like UnixWare which
trigger POLL_ERR or POLL_HUP on a terminated connection. PR 36951.
[Jeff Trawick, Ruediger Pluem]
Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy.c?rev=306900&r1=306899&r2=306900&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy.c Thu Oct 6 14:30:58 2005
@@ -679,8 +679,22 @@
char *url = uri;
/* Try to obtain the most suitable worker */
access_status = ap_proxy_pre_request(&worker, &balancer, r, conf, &url);
- if (access_status != OK)
- return access_status;
+ if (access_status != OK) {
+ /*
+ * Only return if access_status is not HTTP_SERVICE_UNAVAILABLE
+ * This gives other modules the chance to hook into the
+ * request_status hook and decide what to do in this situation.
+ */
+ if (access_status != HTTP_SERVICE_UNAVAILABLE)
+ return access_status;
+ /*
+ * Ensure that balancer is NULL if worker is NULL to prevent
+ * potential problems in the post_request hook.
+ */
+ if (!worker)
+ balancer = NULL;
+ goto cleanup;
+ }
if (balancer && balancer->max_attempts_set && !max_attempts)
max_attempts = balancer->max_attempts;
/* firstly, try a proxy, unless a NoProxy directive is active */