httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: svn commit: r1422584 - /httpd/httpd/branches/2.4.x/STATUS
Date Mon, 17 Dec 2012 08:53:43 GMT
On 16 Dec 2012, at 4:51 PM, Rainer Jung <rainer.jung@kippdata.de> wrote:

> Graham, can you give an example? I don't get the "any attempt at setting
> any directive silently unsets an arbitrary selection of other proxy
> directives at the same time".

Take a look at this code specifically:

+    else {
+        ps->proxies = overrides->proxies;
+        ps->sec_proxy = overrides->sec_proxy;
+        ps->aliases = overrides->aliases;
+        ps->noproxies = overrides->noproxies;
+        ps->dirconn = overrides->dirconn;
+        ps->workers = overrides->workers;
+        ps->balancers = overrides->balancers;
+    }

The above code resets seven proxy directives to their default values, whether they have been
overridden by the administrator or not. There is no merge going on at all. As a result, an
administrator that adds any unrelated global scoped proxy directive causes the above seven
directives to disappear as a side effect, without warning or reason.

In contrast, the following performs a merge:

    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;

This is an alternative merge, where we consider the override value unset (and therefore no
merge) if it is NULL:

    ps->forward = overrides->forward ? overrides->forward : base->forward;
    ps->reverse = overrides->reverse ? overrides->reverse : base->reverse;

Regards,
Graham
--


Mime
View raw message