Skip to content

Commit 35a2b49

Browse files
author
Kent Richards
committed
Add request QUERY_STRING to server environment.
#5, php-pm/php-pm-httpkernel#14
1 parent 117f244 commit 35a2b49

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Bridges/HttpKernel.php

+5
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ protected static function mapRequest(ReactRequest $reactRequest, $content)
138138

139139
$syRequest->setMethod($method);
140140
$syRequest->headers->replace($headers);
141+
142+
// Add server environment.
143+
// @see http://php.net/manual/en/reserved.variables.server.php.
144+
// @see http://www.faqs.org/rfcs/rfc3875.html.
145+
$syRequest->server->set('QUERY_STRING', http_build_query($query));
141146
$syRequest->server->set('REQUEST_URI', $reactRequest->getPath());
142147
$syRequest->server->set('SERVER_NAME', explode(':', $headers['Host'])[0]);
143148

0 commit comments

Comments
 (0)