httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59491] New: mod_rewrite proxy uses wrong filename for ^$
Date Wed, 11 May 2016 22:15:08 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59491

            Bug ID: 59491
           Summary: mod_rewrite proxy uses wrong filename for ^$
           Product: Apache httpd-2
           Version: 2.4.20
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
          Assignee: bugs@httpd.apache.org
          Reporter: jim@jtan.com

This seems related to Bug 53929.  With a rule like this:

  RewriteRule ^$ http://jim.sh/foo.txt [P]

then requesting "http://jim.sh/" incorrectly returns the contents of
"index.html" instead of "foo.txt".  This had previously worked fine on 2.2.x
and broke when I upgraded to 2.4.x.  Either of these replacements work as
expected:

  RewriteRule ^test$ http://jim.sh/foo.txt [P]
  RewriteRule ^$ foo.txt

(and the latter is of course what I should have used to begin with!)
Here is the full log of the erroneous case:

[Wed May 11 17:42:38.139585 2016] [mpm_prefork:notice] [pid 11161] AH00163:
Apache/2.4.20 (Debian) SVN/1.8.10 OpenSSL/1.0.2d mod_wsgi/4.3.0 Python/2.7.9
mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed May 11 17:42:38.139601 2016] [core:notice] [pid 11161] AH00094: Command
line: '/usr/sbin/apache2'
[Wed May 11 17:42:39.636867 2016] [rewrite:trace2] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] init rewrite engine with
requested uri /
[Wed May 11 17:42:39.636931 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] applying pattern '^/store$'
to uri '/'
[Wed May 11 17:42:39.636947 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] applying pattern
'^/store/(.*)$' to uri '/'
[Wed May 11 17:42:39.636956 2016] [rewrite:trace1] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] pass through /
[Wed May 11 17:42:39.637398 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] strip
per-dir prefix: /www/psy/ -> 
[Wed May 11 17:42:39.637408 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] applying
pattern '^$' to uri ''
[Wed May 11 17:42:39.637422 2016] [rewrite:trace4] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/]
RewriteCond: input='curl/7.47.0' pattern='^Wget.*' => not-matched
[Wed May 11 17:42:39.637431 2016] [rewrite:trace4] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/]
RewriteCond: input='curl/7.47.0' pattern='^lwp-request.*' => not-matched
[Wed May 11 17:42:39.637440 2016] [rewrite:trace4] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/]
RewriteCond: input='curl/7.47.0' pattern='^puf.*' => not-matched
[Wed May 11 17:42:39.637448 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] strip
per-dir prefix: /www/psy/ -> 
[Wed May 11 17:42:39.637455 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] applying
pattern '^$' to uri ''
[Wed May 11 17:42:39.637465 2016] [rewrite:trace4] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/]
RewriteCond: input='curl/7.47.0' pattern='^curl.*' => matched
[Wed May 11 17:42:39.637473 2016] [rewrite:trace2] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] rewrite
'' -> 'http://jim.sh/foo.txt'
[Wed May 11 17:42:39.637483 2016] [rewrite:trace2] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] escaped
URI in per-dir context for proxy, http://jim.sh/foo.txt ->
http://jim.sh/foo.txt
[Wed May 11 17:42:39.637490 2016] [rewrite:trace2] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] forcing
proxy-throughput with http://jim.sh/foo.txt
[Wed May 11 17:42:39.637534 2016] [rewrite:trace1] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa0644890a0/initial] [perdir /www/psy/] go-ahead
with proxy request proxy:http://jim.sh/foo.txt [OK]
[Wed May 11 17:42:39.637579 2016] [rewrite:trace2] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] init rewrite engine with
requested uri /index.html
[Wed May 11 17:42:39.637588 2016] [rewrite:trace1] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] pass through /index.html
[Wed May 11 17:42:39.637616 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] [perdir /www/psy/] strip
per-dir prefix: /www/psy/index.html -> index.html
[Wed May 11 17:42:39.637638 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] [perdir /www/psy/] applying
pattern '^$' to uri 'index.html'
[Wed May 11 17:42:39.637648 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] [perdir /www/psy/] strip
per-dir prefix: /www/psy/index.html -> index.html
[Wed May 11 17:42:39.637655 2016] [rewrite:trace3] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] [perdir /www/psy/] applying
pattern '^foo$' to uri 'index.html'
[Wed May 11 17:42:39.637662 2016] [rewrite:trace1] [pid 11231]
mod_rewrite.c(477): [client 64.20.176.10:46922] 64.20.176.10 - -
[jim.sh/sid#7fa0670547e8][rid#7fa06447f0a0/subreq] [perdir /www/psy/] pass
through /www/psy/index.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message