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/08/11 22:25:05 UTC

DO NOT REPLY [Bug 49741] New: REQUEST_URI should be explained

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


DO NOT REPLY [Bug 49741] REQUEST_URI should be explained

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49741

Rich Bowen <rb...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugs@httpd.apache.org       |docs@httpd.apache.org

--- Comment #1 from Rich Bowen <rb...@apache.org> 2010-10-29 11:07:29 EDT ---
Moving docs bugs to docs@httpd.a.o ownership.

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