Bug #55780 [Com]: $_SERVER['REQUEST_URI'] does not contain the request's complete URI
Edit report at https://bugs.php.net/bug.php?id=55780&edit=1
ID: 55780
Comment by: chealer at gmail dot com
Reported by: chealer at gmail dot com
Summary: $_SERVER['REQUEST_URI'] does not contain the
request's complete URI
Status: Not a bug
Type: Bug
Package: *General Issues
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Hi Michael,
It is arguably not a bug per se that $_SERVER['REQUEST_URI'] does not contain the
request's URI. One might argue the name is simply misleading. However, there is unarguably a
bug as long as the documentation claims REQUEST_URI contains the URI. As I wrote: "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."
Previous Comments:
------------------------------------------------------------------------
[2013-12-06 07:25:32] mike@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2011-09-25 18:08:40] 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".
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=55780&edit=1
Thread (7 messages)