From nobody@hyperreal.com Mon Jun 2 09:12:06 1997 Received: (from nobody@localhost) by hyperreal.com (8.8.5/8.8.5) id JAA24263; Mon, 2 Jun 1997 09:12:06 -0700 (PDT) Message-Id: <199706021612.JAA24263@hyperreal.com> Date: Mon, 2 Jun 1997 09:12:06 -0700 (PDT) From: Lars Eilebrecht Reply-To: sfx@unix-ag.org To: apbugs@hyperreal.com Subject: Problem with mod_rewrite and proxy requests X-Send-Pr-Version: 3.2 >Number: 656 >Category: mod_proxy >Synopsis: ProxyRemote directive does not send correct proxy requests >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Jun 2 09:20:00 1997 >Last-Modified: Mon Aug 18 02:35:56 PDT 1997 >Originator: sfx@unix-ag.org >Organization: >Release: 1.2.1 >Environment: SunOS 5.4 generic sun4m sparc >Description: I'm not sure it it's really a problem/bug of mod_rewrite, but here's the description. When I use [P]-redirects everything is fine unless I activate a parent cache via 'ProxyRemote'. My test configuration: RewriteRule ^/test(.*)$ http://www.si.unix-ag.org/foobar$1 [P] and ProxyRemote * http://www-cache.uni-siegen.de:3128 When I access the URL-Path /test/ the Apache (mod_proxy) issues the request: GET /test/ HTTP/1.0 Host: www.si.unix-ag.org But this request is wrong, because /test/ is the _local_ URL-path but not the URL-path of the remote server which is - in this test - http://www.si.unix-ag.org/foobar/. When I disable ProxyRemote the correct page is retrieved... The reason why I'm using mod_rewrite as the category of this bug report is that it's very strange that mod_proxy sees the local URL that is used in the RewriteRule directive. Please note that I reported a very similar bug with ProxyRemote several weeks ago. P.S.: The parent proxy mentioned in the above example is a Squid-Cache (1.1.10), but I also used a dummy daemon to check the request Apache made. So it's not a problem with the parent cache itself, because the syntax of the request is ok, but contains the wrong URL-Path. >How-To-Repeat: >Fix: >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: chuck State-Changed-When: Fri Jun 6 00:29:03 PDT 1997 State-Changed-Why: Can you reverse the order of mod_proxy and mod_rewrite in your Configuration file, rebuild, and let us know the result? You may want to try this on 1.2.0. Comment-Added-By: Lars.Eilebrecht@unix-ag.org Comment-Added-When: Wed Aug 6 06:03:26 PDT 1997 Comment-Added: The ProxyRemote directive is broken, it should send a full proxy-request (with or without Host-header), e.g. GET http://www.somehost.tld/foobar.html HTTP/1.0 instead of GET /foobar.html HTTP/1.0 Host: www.somehost.tld Synopsis-Changed-From: Problem with mod_rewrite and proxy requests Synopsis-Changed-To: ProxyRemote directive does not send correct proxy requests Synopsis-Changed-By: Lars.Eilebrecht@unix-ag.org Synopsis-Changed-When: Wed Aug 6 06:03:26 PDT 1997 Release-Changed-From-To: 1.2b10-1.2.1 Release-Changed-By: Lars.Eilebrecht@unix-ag.org Release-Changed-When: Wed Aug 6 06:03:26 PDT 1997 Category-Changed-From-To: mod_rewrite-mod_proxy Category-Changed-By: Lars.Eilebrecht@unix-ag.org Category-Changed-When: Wed Aug 6 06:03:26 PDT 1997 State-Changed-From-To: analyzed-closed State-Changed-By: Lars.Eilebrecht@unix-ag.org State-Changed-When: Mon Aug 18 02:35:56 PDT 1997 State-Changed-Why: A patch has been committed to 1.2.3 and 1.3a2-dev. >Unformatted: