httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micha Lenk <mi...@lenk.info>
Subject Re: [PATCH 51489] ProxyPassReverse issue + patch
Date Mon, 11 Jul 2011 10:18:23 GMT
Hi Nick,

On 9 Jul 2011, at 11:16, Nick Kew wrote:
> On 8 Jul 2011, at 17:29, Micha Lenk wrote:
>
>> I'm using Apache as a reverse proxy in a simple load balancer setup.
>> I use ProxyPassReverse in order to re-write the backend server name in HTTP redirections
(ie. in the Location header of the HTTP response).
>> My configuration for the virtual host essentially looks like this:
>>
>> <Proxy balancer://196f045aca6adc82a0b6eea93ed286a1>
>> 	BalancerMember http://server-1.local status=-SE
>> 	BalancerMember http://server-2.local status=-SE
>> </Proxy>
>
> Is the absence of slashes after local there intentional?  You have a
> slash in your ProxyPass[Reverse] directives.

Yes, the absence of slashes after local is intentional. If I added them, 
the double slash in the Location: header of a redirect response would 
indeed be gone, but it would in turn cause a double slash to be added to 
*every* backend request. In case of a thttpd as backend, this would 
cause the backend to refuse all requests entirely. :(

This seems to be different issue, but maybe I should try to fix this 
instead...

>> What I bother about is the additional slash before '/foo/', so
>> I  digged into the source code and found the following lines in
>> modules/proxy/proxy_util.c:
>
> That's not easy to follow: your comments don't cross-reference to the code
> until I've opened a lot more windows than I have screen space for.
> A link to your bugzilla report would've helped, and your reference to
> source is ambiguous - I guessed /trunk/.

Correct.

> When digging in source for this kind of thing, the "annotate" feature of svn
> is your best tool:
> http://svn.eu.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?annotate=1138627
> The lines you're unhappy about were introduced in r771587:
> http://svn.eu.apache.org/viewvc?view=revision&revision=771587
> which has quite an informative commit message.  Maybe that might help
> to figure out the purpose?

Thank you for the hints. I will take a closer look on the diff once time 
permits. I should have done that before...

Cheers,
Micha

Mime
View raw message