On 10/12/2005 12:28 AM, Jim Jagielski wrote:
> Ruediger Pluem wrote:

[..cut..]

>>BTW: I just noticed that
>>
>>    c = strchr(url, ':');
>>    if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0')
>>       return NULL;
>>
>>in ap_proxy_get_worker of proxy_util.c seem to be unneeded now
>>(Only came to my mind as I saw your commit mail, weird. )
>>If you agree I will remove them tomorrow as a clean-up.
>>
> 
> 
> It's a quick way, I think, I avoiding bogus urls (one's that
> lack schemes) without wasting time with the various
> strncasecmps.

Yes, this is true, but how often will this quick way be used in
a correctly configured system?

> 
> Of course, that get's me thinking... maybe strncmp() is more
> correct. We want to be case ignorant with hostname but NOT
> with path. And, iirc, we force the hostname in name to be
> lowercase. Let me look into that :)
> 

Very good point. From what I see in ap_proxy_add_worker we force
the hostname and only the hostname to be lowercase by
parsing / unparsing the URL, BUT:

1. We do not do so currently with the right side of ProxyPass (real name).
2. We not do this in proxy_handler with the URL we pass to to 
ap_proxy_pre_request.
   I think it would belong here to ensure that we also handle requests from 
mod_rewrite
   correctly. Maybe we need to do the whole URL normalization by parsing the 
URL,
   lowercasing the hostname and unparsing the URL also in ap_proxy_get_worker.
3. The whole URL is converted to lowercase for BalancerMembers in line 1438 of
   mod_proxy.c before this name is added as a worker :-(.

So some work is left over to fix this. Curious to see what additional
things you will find :).


Regards

RĂ¼diger






Reply via email to