Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61B3D45B8 for ; Mon, 11 Jul 2011 10:21:04 +0000 (UTC) Received: (qmail 33947 invoked by uid 500); 11 Jul 2011 10:21:03 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 33195 invoked by uid 500); 11 Jul 2011 10:20:53 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 33172 invoked by uid 99); 11 Jul 2011 10:20:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2011 10:20:50 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of micha@lenk.info designates 188.40.85.232 as permitted sender) Received: from [188.40.85.232] (HELO mail.lenk.info) (188.40.85.232) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2011 10:20:41 +0000 Received: from port-92-198-130-130.static.qsc.de ([92.198.130.130]:60640 helo=[10.128.129.130]) by mail.lenk.info with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1QgDaz-0002vN-0e for dev@httpd.apache.org; Mon, 11 Jul 2011 12:20:09 +0200 X-CTCH-RefID: str=0001.0A0B020B.4E1ACE59.009B,ss=1,re=0.000,fgs=0 Message-ID: <4E1ACDEF.1070704@lenk.info> Date: Mon, 11 Jul 2011 12:18:23 +0200 From: Micha Lenk User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110626 Lightning/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [PATCH 51489] ProxyPassReverse issue + patch References: <4E17307E.5060602@lenk.info> <03A772B3-AD73-42EF-95BE-788851ECF877@webthing.com> In-Reply-To: <03A772B3-AD73-42EF-95BE-788851ECF877@webthing.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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: >> >> >> BalancerMember http://server-1.local status=-SE >> BalancerMember http://server-2.local status=-SE >> > > 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