Bug #66978 [Opn->Nab]: $_SERVER['REQUEST_URI'] does not contain the request's complete URI

From: Date: Fri, 28 Mar 2014 22:56:33 +0000
Subject: Bug #66978 [Opn->Nab]: $_SERVER['REQUEST_URI'] does not contain the request's complete URI
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184958@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66978&edit=1

 ID:                 66978
 Updated by:         rasmus@php.net
 Reported by:        chealer at gmail dot com
 Summary:            $_SERVER['REQUEST_URI'] does not contain the
                     request's complete URI
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            *General Issues
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

It is not a question of fixing it. PHP has nothing to do with setting the REQUEST_URI in most cases.
This is a $_SERVER variable and is set by the server. For some edge-case SAPIs we do set it, but for
the most common ones this is set by the server so if you think it is set wrong when you are running
mod_php under Apache, for example, then you need to file a bug with Apache.


Previous Comments:
------------------------------------------------------------------------
[2014-03-28 22:45:46] chealer at gmail dot com

Description:
------------
According to http://www.php.net/manual/en/reserved.variables.server.php
the REQUEST_URI entry of $_SERVER contains "The URI which was given in order to access this
page".

As reported in #55780, this is not the case, as the example given just after shows: "for
instance, '/index.html'". Actually, REQUEST_URI contains a URI reference.

This bug exists since as far as I can remember. At this point, it is probably a bad idea to simply
fix. This should probably be treated as a documentation bug, and just cause the $_SERVER
documentation to fix the entry description, adding a warning about the name.

However, having the actual request URI would be useful too, be it through a new
"ACTUAL_REQUEST_URI" entry, a function, or something.

Note: this bug is not completely PHP-specific. http://labs.apache.org/webarch/uri/rfc/rfc3986.html#hierarchical
gives a historical perspective on URI/URL terminology.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66978&edit=1


Thread (5 messages)

« previous php.bugs (#184958) next »