httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1609680 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c mod_proxy.h proxy_util.c
Date Fri, 11 Jul 2014 11:38:58 GMT

On Jul 11, 2014, at 6:36 AM, jkaluza@apache.org wrote:

> Author: jkaluza
> Date: Fri Jul 11 10:36:15 2014
> New Revision: 1609680
> 
> URL: http://svn.apache.org/r1609680
> Log:
> mod_proxy: add ap_proxy_define_match_worker() and use it for ProxyPassMatch
> and ProxyMatch section to distinguish between normal workers and workers
> with regex substitutions in the name. Implement handling of such workers
> in ap_proxy_get_worker(). PR 43513
> 
> Modified:
>    httpd/httpd/trunk/modules/proxy/mod_proxy.c
>    httpd/httpd/trunk/modules/proxy/mod_proxy.h
>    httpd/httpd/trunk/modules/proxy/proxy_util.c
> 
> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1609680&r1=1609679&r2=1609680&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Fri Jul 11 10:36:15 2014
> @@ -1647,15 +1647,30 @@ static const char *
>         new->balancer = balancer;
>     }
>     else {
> -        proxy_worker *worker = ap_proxy_get_worker(cmd->temp_pool, NULL, conf, de_socketfy(cmd->pool,
r));
> +        proxy_worker *worker = ap_proxy_get_worker(cmd->temp_pool, NULL, conf, new->real);

Why do we no longer de_socketfy? Looks like this breaks UDS.

>         int reuse = 0;
>         if (!worker) {
> -            const char *err = ap_proxy_define_worker(cmd->pool, &worker, NULL,
conf, r, 0);
> +            const char *err;
> +            if (use_regex) {
> +                err = ap_proxy_define_match_worker(cmd->pool, &worker, NULL,
> +                                                   conf, r, 0);
> +            }
> +            else {
> +                err = ap_proxy_define_worker(cmd->pool, &worker, NULL,
> +                                             conf, r, 0);
> +            }
>             if (err)
>                 return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
> 
>             PROXY_COPY_CONF_PARAMS(worker, conf);
> -        } else {
> +        }
> +        else if ((use_regex != 0) ^ (worker->s->is_name_matchable)) {

Minor nit: I always disliked using bitwise xor for boolean xor :/

We need an mmn bump.


Mime
View raw message