httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24888] New: - URI case sensitive under Windows
Date Fri, 21 Nov 2003 12:22:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24888>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24888

URI case sensitive under Windows

           Summary: URI case sensitive under Windows
           Product: Apache httpd-1.3
           Version: 1.3.29
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jarod@tin.it


Hello,
actually it's not possible make rewrite rules to work on both windows and *nix.
Check this example inside an .htaccess
...
RewriteRule ^Andrea$ etc
...
If I use
example.com/ANDREA
or
example.com/anDREa
the internal URI will always be made lowercase under windows.
(Check util_win32.c, function ap_os_canonical_filename)

So in the previous .htaccess example typing example.com/Andrea won't match,
I need to use instead:

RewriteCond %{REQUEST_URI} ^/Andrea$
etc
( as you can see the REQUEST_URI enviroment variable is case sensitive )
Under *nix, as far as I know, that problem doesn't exist.

Taking a look at mod_rewrite.c code I saw that replacing
the line
uri = r->filename;
with
uri = r->case_preserved_filename;
it will let it work.
(the function is apply_rewrite_rule, and the line is 1851)

I saw that in the source code ``filename'' is always used instead of
``case_preserved_filename''.

Not sure this an issue,
but maybe it could be nice to work in the same indipendent from the platform.


THank you,
Mr Andrea Rossignoli, Italy

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


Mime
View raw message