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 2010/11/27 20:24:21 UTC
DO NOT REPLY [Bug 50349] New: Slash after a file gets ignored and
the file is served, should 404 instead.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
Summary: Slash after a file gets ignored and the file is
served, should 404 instead.
Product: Apache httpd-2
Version: 2.2.17
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: bugs@httpd.apache.org
ReportedBy: fictive@sci.fi
### Problem
Apache serves a file, even though it should serve 404.
### File structure
/.htaccess [FILE]
/testikansio/ [DIR]
/testikansio/tekstitiedosto [FILE]
### .htaccess
RewriteEngine On
Rewritebase /
RewriteCond %{REQUEST_URI} !^/testikansio
RewriteRule ^(.*)$ /testikansio/$1
### GET http://gateway.local.lan/tekstitiedosto
Result: The file is served. [CORRECT]
] (3) [perdir /srv/http/] add path info postfix: /srv/http/testitiedosto ->
/srv/http/testitiedosto/
] (3) [perdir /srv/http/] strip per-dir prefix: /srv/http/testitiedosto/ ->
testitiedosto/
] (3) [perdir /srv/http/] applying pattern '^(.*)$' to uri 'testitiedosto/'
] (4) [perdir /srv/http/] RewriteCond: input='/testitiedosto/'
pattern='!^/testikansio' => matched
] (2) [perdir /srv/http/] rewrite 'testitiedosto/' ->
'/testikansio/testitiedosto/'
] (2) [perdir /srv/http/] trying to replace prefix /srv/http/ with /
] (1) [perdir /srv/http/] internal redirect with /testikansio/testitiedosto/
[INTERNAL REDIRECT]
/redir#1] (3) [perdir /srv/http/] add path info postfix:
/srv/http/testikansio/testitiedosto -> /srv/http/testikansio/testitiedosto/
/redir#1] (3) [perdir /srv/http/] strip per-dir prefix:
/srv/http/testikansio/testitiedosto/ -> testikansio/testitiedosto/
/redir#1] (3) [perdir /srv/http/] applying pattern '^(.*)$' to uri
'testikansio/testitiedosto/'
/redir#1] (4) [perdir /srv/http/] RewriteCond:
input='/testikansio/testitiedosto/' pattern='!^/testikansio' => not-matched
/redir#1] (1) [perdir /srv/http/] pass through
/srv/http/testikansio/testitiedosto
### GET http://gateway.local.lan/tekstitiedosto/XYZ
Result: The file is served. [WRONG]
] (3) [perdir /srv/http/] add path info postfix: /srv/http/testitiedosto ->
/srv/http/testitiedosto/XYZ
] (3) [perdir /srv/http/] strip per-dir prefix: /srv/http/testitiedosto/XYZ ->
testitiedosto/XYZ
] (3) [perdir /srv/http/] applying pattern '^(.*)$' to uri 'testitiedosto/XYZ'
] (4) [perdir /srv/http/] RewriteCond: input='/testitiedosto/XYZ'
pattern='!^/testikansio' => matched
] (2) [perdir /srv/http/] rewrite 'testitiedosto/XYZ' ->
'/testikansio/testitiedosto/XYZ'
] (2) [perdir /srv/http/] trying to replace prefix /srv/http/ with /
] (1) [perdir /srv/http/] internal redirect with /testikansio/testitiedosto/XYZ
[INTERNAL REDIRECT]
/redir#1] (3) [perdir /srv/http/] add path info postfix:
/srv/http/testikansio/testitiedosto -> /srv/http/testikansio/testitiedosto/XYZ
/redir#1] (3) [perdir /srv/http/] strip per-dir prefix:
/srv/http/testikansio/testitiedosto/XYZ -> testikansio/testitiedosto/XYZ
/redir#1] (3) [perdir /srv/http/] applying pattern '^(.*)$' to uri
'testikansio/testitiedosto/XYZ'
/redir#1] (4) [perdir /srv/http/] RewriteCond:
input='/testikansio/testitiedosto/XYZ' pattern='!^/testikansio' => not-matched
/redir#1] (1) [perdir /srv/http/] pass through
/srv/http/testikansio/testitiedosto
### GET http://gateway.local.lan/testitiedosto/XYZ/
Result: The file is served. [WRONG]
] (3) [perdir /srv/http/] add path info postfix: /srv/http/testitiedosto ->
/srv/http/testitiedosto/XYZ/
] (3) [perdir /srv/http/] strip per-dir prefix: /srv/http/testitiedosto/XYZ/ ->
testitiedosto/XYZ/
] (3) [perdir /srv/http/] applying pattern '^(.*)$' to uri 'testitiedosto/XYZ/'
] (4) [perdir /srv/http/] RewriteCond: input='/testitiedosto/XYZ/'
pattern='!^/testikansio' => matched
] (2) [perdir /srv/http/] rewrite 'testitiedosto/XYZ/' ->
'/testikansio/testitiedosto/XYZ/'
] (2) [perdir /srv/http/] trying to replace prefix /srv/http/ with /
] (1) [perdir /srv/http/] internal redirect with
/testikansio/testitiedosto/XYZ/ [INTERNAL REDIRECT]
/redir#1] (3) [perdir /srv/http/] add path info postfix:
/srv/http/testikansio/testitiedosto -> /srv/http/testikansio/testitiedosto/XYZ/
/redir#1] (3) [perdir /srv/http/] strip per-dir prefix:
/srv/http/testikansio/testitiedosto/XYZ/ -> testikansio/testitiedosto/XYZ/
/redir#1] (3) [perdir /srv/http/] applying pattern '^(.*)$' to uri
'testikansio/testitiedosto/XYZ/'
/redir#1] (4) [perdir /srv/http/] RewriteCond:
input='/testikansio/testitiedosto/XYZ/' pattern='!^/testikansio' => not-matched
/redir#1] (1) [perdir /srv/http/] pass through
/srv/http/testikansio/testitiedosto
### Command: httpd -v
Server version: Apache/2.2.17 (Unix)
Server built: Oct 21 2010 09:07:26
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.4.2, APR-Util 1.3.10
Compiled using: APR 1.4.2, APR-Util 1.3.10
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/httpd/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Distro: Up-to-date Arch Linux as of 27.11.2010
Apache installed from pacman. Only configuration change was AllowOverride All,
RewriteLog and RewriteLevel 9.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 50349] Slash after a file gets ignored and the
file is served, should 404 instead.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
Eric Covener <co...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Eric Covener <co...@gmail.com> 2011-02-08 08:02:35 EST ---
backported to 2.2.x in http://svn.apache.org/viewvc?rev=1068255&view=rev
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 50349] Slash after a file gets ignored and the
file is served, should 404 instead.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
--- Comment #1 from fictive@sci.fi 2010-11-27 14:27:33 EST ---
Created an attachment (id=26350)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26350)
The rewrite log. Not word wrapped.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 50349] Slash after a file gets ignored and the
file is served, should 404 instead.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
--- Comment #3 from Eric Covener <co...@gmail.com> 2010-12-06 23:04:32 EST ---
Created an attachment (id=26377)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26377)
fix init of use_path_info
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 50349] Slash after a file gets ignored and the
file is served, should 404 instead.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
Eric Covener <co...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk
--- Comment #4 from Eric Covener <co...@gmail.com> 2010-12-07 08:08:35 EST ---
http://svn.apache.org/viewvc?rev=1043023&view=rev
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 50349] Slash after a file gets ignored and the
file is served, should 404 instead.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
Eric Covener <co...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #2 from Eric Covener <co...@gmail.com> 2010-11-27 14:43:01 EST ---
Since you didn't mention AcceptPathInfo, this probably would have been more
appropriate to start life on the users mailing list.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 50349] Slash after a file gets ignored and the
file is served, should 404 instead.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50349
Eric Covener <co...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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