Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Dec 10, 2017
1 parent 5f17e61 commit 85fcdd9
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/Bridge/Psr7/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/**
* Create a PSR-7 request from a lambda event.
*
* TODO use Diactoros to have less dependencies.
*
* @author Matthieu Napoli <[email protected]>
*/
class RequestFactory
Expand All @@ -36,19 +34,6 @@ public function fromLambdaEvent(array $event) : ServerRequestInterface
'REQUEST_URI' => $uri,
];

// Inspired from \Symfony\Component\HttpFoundation\Request::overrideGlobals()
// foreach ($headers as $key => $value) {
// $key = strtoupper(str_replace('-', '_', $key));
// if (in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) {
// $server[$key] = implode(', ', $value);
// } else {
// $server['HTTP_'.$key] = implode(', ', (array) $value);
// }
// }

// $request = Request::createFromEnvironment(new Environment($server));
// $request = $request->withParsedBody($request);

$request = new ServerRequest(
$server,
$files,
Expand Down

0 comments on commit 85fcdd9

Please sign in to comment.