The PHPDoc for request_uri() says:

Because $_SERVER['REQUEST_URI'] is only available on Apache, we generate an equivalent using other environment variables.

This is incorrect as IIS7 sets $_SERVER['REQUEST_URI'], and I'm guessing so do some other modern web servers. We need to research the current state of popular web servers and update this documentation accordingly.

Related: #1547310: request_uri() returns incorrect URI for some builds of IIS7

Comments

effulgentsia’s picture

Issue tags: +Documentation

tagging

effulgentsia’s picture

Issue summary: View changes

Updated issue summary.

Robert_T’s picture

Issue summary: View changes
Status: Active » Needs review

This issue appears to be obsolete. The request_uri() function does not appear in D8; the closest equivalent is in \Symfony\Component\HttpFoundation\ApacheRequest::prepareRequestUri().

dawehner’s picture

Status: Needs review » Fixed

You are absolutely right, this method is not in Drupal itself anymore. Especially
\Symfony\Component\HttpFoundation\Request::prepareRequestUri has quite some edge cases shown, so I think its fine to close this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

David_Rothstein’s picture

Version: 8.0.x-dev » 7.x-dev
Component: base system » documentation
Status: Closed (fixed) » Active

Should probably do something about that for Drupal 7, though.