httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] Bug 36816: balancer_manager doesn't work if worker name contains port
Date Tue, 11 Oct 2005 12:35:28 GMT

On Oct 10, 2005, at 5:13 PM, Ruediger Pluem wrote:

>
>
> On 10/10/2005 05:43 PM, Jim Jagielski wrote:
>
>> For consideration:
>>
>
> [..cut..]
>
> Thanks for your thoughts.
> BTW: It was a little bit tricky to apply the patch as my Mozilla
> seems to have changed things in the mail spaces / empty lines.
> So I guess attached patches are easier to handle :-).
>
> I think I found one big problem with the patch:
>
> When we call ap_proxy_get_worker in line 1316 of proxy_util.c
> (ap_proxy_pre_request), then the parameter url already contains
> the complete URL we must call on the remote server. Example:
>
> ServerName example.com
> ProxyPass /mirror/foo http://backend.com/rsync
>
> This would result in a worker named
>
> http://backend.com/rsync
>
>
> Calling http://example.com/mirror/foo/bar would be translated to
>
> proxy:http://backend.com/rsync/bar in the translate_name hook of  
> mod_proxy.
>
> Thus ap_proxy_get_worker would be called with the URL http:// 
> backend.com/rsync/bar
> which would lead to a no match. I guess instead of a simple strcasecmp
> we need something like a "longest match" here since I think we  
> cannot rely
> on the order the workers got stored.

Yes, I was also considering that case as well; I simply wanted to
give people a head's up on the direction the solution was taking
in order to get prelim feedback. 

Mime
View raw message