Skip to content

Commit

Permalink
Bugfix: solved issue with request uri missing query string.
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharthesavior committed Aug 29, 2023
1 parent 42c85f7 commit 336e9e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Services/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 336e9e1

Please sign in to comment.