Skip to content

Commit

Permalink
Don't normalize query string in PsrHttpFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 25, 2020
1 parent 1309b64 commit bc25829
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,12 @@
CHANGELOG
=========

# 2.0.1 (2020-06-25)

* Don't normalize query string in PsrHttpFactory
* Fix conversion for HTTPS requests
* Fix populating default port and headers in HttpFoundationFactory

# 2.0.0 (2020-01-02)

* Remove DiactorosFactory
Expand Down
5 changes: 4 additions & 1 deletion Factory/PsrHttpFactory.php
Expand Up @@ -48,9 +48,12 @@ public function __construct(ServerRequestFactoryInterface $serverRequestFactory,
*/
public function createRequest(Request $symfonyRequest)
{
$uri = $symfonyRequest->server->get('QUERY_STRING', '');
$uri = $symfonyRequest->getSchemeAndHttpHost().$symfonyRequest->getBaseUrl().$symfonyRequest->getPathInfo().('' !== $uri ? '?'.$uri : '');

$request = $this->serverRequestFactory->createServerRequest(
$symfonyRequest->getMethod(),
$symfonyRequest->getUri(),
$uri,
$symfonyRequest->server->all()
);

Expand Down

0 comments on commit bc25829

Please sign in to comment.