Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
fix(http): proper creation of $_SERVER['REQUEST_URI'] (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fris authored Jul 8, 2020
1 parent 7acabd7 commit 78bb42b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Bridge/Symfony/HttpFoundation/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public function make(SwooleRequest $request): HttpFoundationRequest
$server['HTTP_'.\mb_strtoupper(\str_replace('-', '_', $key))] = $value;
}

$queryString = $server['QUERY_STRING'] ?? '';
$server['REQUEST_URI'] = $server['REQUEST_URI'].('' !== $queryString ? '?'.$queryString : '');

return new HttpFoundationRequest(
$request->get ?? [],
$request->post ?? [],
Expand Down

0 comments on commit 78bb42b

Please sign in to comment.