Skip to content

Commit

Permalink
[HttpFoundation] populate $_SERVER with HTTP headers when calling Req…
Browse files Browse the repository at this point in the history
…uest::overrideGlobals()
  • Loading branch information
wodkaist authored and fabpot committed Jul 28, 2010
1 parent a233775 commit e931825
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Components/HttpFoundation/Request.php 100644 → 100755
Expand Up @@ -225,6 +225,10 @@ public function overrideGlobals()
$_COOKIES = $this->cookies->all();
// FIXME: populate $_FILES

foreach ($this->headers->all() as $key => $value) {
$_SERVER['HTTP_'.strtoupper(str_replace('-', '_', $key))] = $value;
}

// FIXME: should read variables_order and request_order
// to know which globals to merge and in which order
$_REQUEST = array_merge($_GET, $_POST);
Expand Down

0 comments on commit e931825

Please sign in to comment.