You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2012/12/14 16:02:34 UTC
svn commit: r1421912 - in /httpd/httpd/trunk: docs/manual/mod/mod_proxy.xml
modules/proxy/mod_proxy.c modules/proxy/mod_proxy.h
Author: rjung
Date: Fri Dec 14 15:02:30 2012
New Revision: 1421912
URL: http://svn.apache.org/viewvc?rev=1421912&view=rev
Log:
Use inherit_set to let the global server set
the default for all vhosts.
Otherwise inherit would need to be disabled
redundantly in each vhost.
Modified:
httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
httpd/httpd/trunk/modules/proxy/mod_proxy.c
httpd/httpd/trunk/modules/proxy/mod_proxy.h
Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml?rev=1421912&r1=1421911&r2=1421912&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml Fri Dec 14 15:02:30 2012
@@ -1208,6 +1208,7 @@ ProxyPass / balancer://hotcluster/
Balancers and Workers defined in the main server. This can cause issues and
inconsistent behavior if using the Balancer Manager and so should be disabled
if using that feature.</p>
+ <p>The setting in the global server defines the default for all vhosts.</p>
</usage>
</directivesynopsis>
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1421912&r1=1421911&r2=1421912&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Fri Dec 14 15:02:30 2012
@@ -1161,6 +1161,7 @@ static void * create_proxy_config(apr_po
ps->max_balancers = 0;
ps->bal_persist = 0;
ps->inherit = 1;
+ ps->inherit_set = 0;
ps->bgrowth = 5;
ps->bgrowth_set = 0;
ps->req_set = 0;
@@ -1187,7 +1188,10 @@ static void * merge_proxy_config(apr_poo
proxy_server_conf *base = (proxy_server_conf *) basev;
proxy_server_conf *overrides = (proxy_server_conf *) overridesv;
- if (overrides->inherit || base->inherit) {
+ ps->inherit = (overrides->inherit_set == 0) ? base->inherit : overrides->inherit;
+ ps->inherit_set = overrides->inherit_set || base->inherit_set;
+
+ if (ps->inherit) {
ps->proxies = apr_array_append(p, base->proxies, overrides->proxies);
ps->sec_proxy = apr_array_append(p, base->sec_proxy, overrides->sec_proxy);
ps->aliases = apr_array_append(p, base->aliases, overrides->aliases);
@@ -1218,7 +1222,6 @@ static void * merge_proxy_config(apr_poo
ps->bgrowth_set = overrides->bgrowth_set || base->bgrowth_set;
ps->max_balancers = overrides->max_balancers || base->max_balancers;
ps->bal_persist = overrides->bal_persist;
- ps->inherit = overrides->inherit || base->inherit;
ps->recv_buffer_size = (overrides->recv_buffer_size_set == 0) ? base->recv_buffer_size : overrides->recv_buffer_size;
ps->recv_buffer_size_set = overrides->recv_buffer_size_set || base->recv_buffer_size_set;
ps->io_buffer_size = (overrides->io_buffer_size_set == 0) ? base->io_buffer_size : overrides->io_buffer_size;
@@ -1909,6 +1912,7 @@ static const char *set_inherit(cmd_parms
ap_get_module_config(parms->server->module_config, &proxy_module);
psf->inherit = flag;
+ psf->inherit_set = 1;
return NULL;
}
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?rev=1421912&r1=1421911&r2=1421912&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Fri Dec 14 15:02:30 2012
@@ -179,6 +179,7 @@ typedef struct {
unsigned int source_address_set:1;
unsigned int bgrowth_set:1;
unsigned int inherit:1;
+ unsigned int inherit_set:1;
unsigned int bal_persist:1;
} proxy_server_conf;