You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2004/09/21 17:20:19 UTC
DO NOT REPLY [Bug 31344] New: -
mod_rewrite PATH_INFO issue in 1.3.31 - not in 1.3.29
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31344>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31344
mod_rewrite PATH_INFO issue in 1.3.31 - not in 1.3.29
Summary: mod_rewrite PATH_INFO issue in 1.3.31 - not in 1.3.29
Product: Apache httpd-1.3
Version: 1.3.31
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Major
Priority: Other
Component: core
AssignedTo: bugs@httpd.apache.org
ReportedBy: jason@jasonpark.com
PATH_INFO when passed to mod_Rewrite in Apache 1.3.31 is incorrect. It
contains the document path - which is appended to the rewrite statement.
RewriteCond %{REQUEST_URI} ^/PROXYTHIS/.*
RewriteRule /PROXYTHIS/(.*)$ http://www.anotherdomain.com/$1 [P]
This works fine on 1.3.29 and other prior versions and has the following
functionality:
Original: http://www.thisdomain.com/PROXYTHIS/test.cgi?This=that
Rewrite Proxy: proxy:http://www.anotherdomain.com/test.cgi
-- Rewrite Log - From Apache 1.3.29 - Works Correctly --
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:45:07 -0500]
[www.thisdomain.com/sid#80ccc6c][rid#80c731c/initial] (3) applying
pattern '/PROXYTHIS/(.*)$' to
uri '/home/thisuser/public_html/PROXYTHIS/test.cgi'
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:45:07 -0500]
[www.thisdomain.com/sid#80ccc6c][rid#80c731c/initial] (2)
rewrite /home/thisuser/public_html/PROXYTHIS/test.cgi ->
http://www.anotherdomain.com/test.cgi
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:45:07 -0500]
[www.thisdomain.com/sid#80ccc6c][rid#80c731c/initial] (2) forcing proxy-
throughput with http://www.anotherdomain.com/test.cgi
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:45:07 -0500]
[www.thisdomain.com/sid#80ccc6c][rid#80c731c/initial] (1) go-ahead with proxy
request proxy:http://www.anotherdomain.com/test.cgi [OK]
--
With Apache 1.3.31 though, I am getting some very unexpected behavior. The
document path, if the original document actually existed and was not to be
rewritten, is appended to the proxy URL like so:
Original: http://www.thisdomain.com/PROXYTHIS/test.cgi?This=that
Rewrite Proxy:
proxy:http://www.anotherdomain.com/test.cgi/home/thisuser/public_html/PROXYTHIS
/test.cgi
-- Rewrite Log - From Apache 1.3.31 - INCORRECT --
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:47:13 -0500]
[www.thisdomain.com/sid#80d87bc][rid#80a5454/initial] (2) init rewrite engine
with requested uri /PROXYTHIS/test.cgi
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:47:13 -0500]
[www.thisdomain.com/sid#80d87bc][rid#80a5454/initial] (3) applying
pattern '/PROXYTHIS/(.*)$' to uri '/PROXYTHIS/test.cgi'
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:47:13 -0500]
[www.thisdomain.com/sid#80d87bc][rid#80a5454/initial] (2)
rewrite /PROXYTHIS/test.cgi -> http://www.anotherdomain.com/test.cgi
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:47:13 -0500]
[www.thisdomain.com/sid#80d87bc][rid#80a5454/initial] (2) forcing proxy-
throughput with http://www.anotherdomain.com/test.cgi
Xxx.xxx.xxx.xxx - - [16/Sep/2004:13:47:13 -0500]
[www.thisdomain.com/sid#80d87bc][rid#80a5454/initial] (1) go-ahead with proxy
request
proxy:http://www.anotherdomain.com/test.cgi/home/thisuser/public_html/PROXYTHIS
/test.cgi [OK]
I am not much of a C programmer, but I put in quite a bit of debug logging
into the mod_rewrite module and the stuff that is getting added on at the end
is coming from PATH_INFO, which is the PATH_INFO passed into mod_rewrite as
mod_rewrite does not modify it.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org