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,