From e57986fb245f1265714b46d58616517e1c49bbc4 Mon Sep 17 00:00:00 2001 From: mfris Date: Tue, 7 Jul 2020 19:12:48 +0200 Subject: [PATCH] fix(http): proper creation of $_SERVER['REQUEST_URI'] --- src/Bridge/Symfony/HttpFoundation/RequestFactory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Bridge/Symfony/HttpFoundation/RequestFactory.php b/src/Bridge/Symfony/HttpFoundation/RequestFactory.php index 4c519100..24b8ee8c 100644 --- a/src/Bridge/Symfony/HttpFoundation/RequestFactory.php +++ b/src/Bridge/Symfony/HttpFoundation/RequestFactory.php @@ -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 ?? [],