From 336e9e165c68b483e569671ce7fac7727f85fac4 Mon Sep 17 00:00:00 2001 From: Savio Resende Date: Mon, 28 Aug 2023 23:07:13 -0500 Subject: [PATCH] Bugfix: solved issue with request uri missing query string. --- src/Services/Server.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Services/Server.php b/src/Services/Server.php index 045dc7e..85f30c8 100644 --- a/src/Services/Server.php +++ b/src/Services/Server.php @@ -268,11 +268,22 @@ private function gatherRequestInfo(Request $request): array cookies: array_change_key_case($request->cookie ?? []), contentLength: strlen($content), ); + $this->requestUriTweak($requestOptions); event(JackedRequestReceived::class, $requestOptions, $content); return [ $requestOptions, $content ]; } + private function requestUriTweak(array &$requestOptions): void + { + if ( + !empty($requestOptions['QUERY_STRING']) + && !str_contains($requestOptions['REQUEST_URI'], '?') + ) { + $requestOptions['REQUEST_URI'] .= '?' . $requestOptions['QUERY_STRING']; + } + } + private function prepareRequestOptions( string $method, array $serverInfo,