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 49741] New: REQUEST_URI should be explained
Date Wed, 11 Aug 2010 20:25:05 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49741

           Summary: REQUEST_URI should be explained
           Product: Apache httpd-2
           Version: 2.2-HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: qdinar@gmail.com


REQUEST_URI should be explained.
see http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond :
(this bug is also present in older versions of documentation: 1.3, 2.0 )

REQUEST_URI
    The resource requested in the HTTP request line. (In the example above,
this would be "/index.html".)

this is very buggy explanation.
by the way, there is not only documentation bug, but also mod_rewrite bug.
because:
URI means full uri from http: till #hash .
REQUEST_URI mean, by rules of english language, uri which was requested from
server, so it is usually without last #hash part and ends with query string or
file name or directory name.
but in apache httpd mod_rewrite REQUEST_URI does not mean that, instead it
means only part of uri without protocol, host, port, query string, question
mark that is immediately before query string, also without #hash part. ie it is
only part like /path/to/file or /path/to/file/ (which cannot contain unencoded
question mark..) . so it should be warned in documentation or even mod_rewrite
should use other keywords.

example configuraton part:
<VirtualHost *:80>
    ServerName www2.example.com
    RewriteEngine on
    #RewriteCond %{REQUEST_URI} http.*
    RewriteCond %{REQUEST_URI} www2
    RewriteRule .* http://sayt1.example.com/ [R=301]
</VirtualHost>
if REQUEST_URI meant request uri, it would redirect when
http://www2.example.com/ is requested, but it does not, and it redirects if
http://www2.example.com/www2 is requested. http://www2.example.com/?www2 also
does not redirect.

one bad effect of this bug in mod_rewrite is that existence of question mark
that is used to mark beginning of query string cannot be detected with mod
rewrite in case of requested uri is like http://example.com/?  .

-- 
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


Mime
View raw message