Skip to content

Commit

Permalink
merged branch sasezaki/ZF-4491 (PR #5222)
Browse files Browse the repository at this point in the history
This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #5222).

Commits
-------

60cd7c0 [HttpFoundation] Support the new Microsoft URL Rewrite Module for IIS 7.0. @see http://framework.zend.com/issues/browse/ZF-4491 @see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842

Discussion
----------

[HttpFoundation] Support the new Microsoft URL Rewrite Module for IIS 7.0

@see http://framework.zend.com/issues/browse/ZF-4491
@see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842
feel free, merge this or not.

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

by stloyd at 2012-08-09T09:41:18Z

Also this PR should be made against `2.0` branch.

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

by fabpot at 2012-09-18T17:24:26Z

@sasezaki Can you open a PR for the 2.0 branch? Thanks.
  • Loading branch information
fabpot committed Sep 28, 2012
2 parents 33abe78 + 7444cb9 commit 5984dee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Symfony/Component/HttpFoundation/Request.php
Expand Up @@ -1083,8 +1083,11 @@ protected function prepareRequestUri()
{
$requestUri = '';

if ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
// check this first so IIS will catch
if ($this->headers->has('X_ORIGINAL_URL') && false !== stripos(PHP_OS, 'WIN')) {
// IIS with Microsoft Rewrite Module
$requestUri = $this->headers->get('X_ORIGINAL_URL');
} elseif ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
// IIS with ISAPI_Rewrite
$requestUri = $this->headers->get('X_REWRITE_URL');
} elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') {
// IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
Expand Down

0 comments on commit 5984dee

Please sign in to comment.