Skip to content

Commit

Permalink
Fix Nette connector
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Jul 22, 2015
1 parent 895e7e1 commit cf80900
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Connector/Nette.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ public function doRequest($request)

$_SERVER['REQUEST_METHOD'] = $method = strtoupper($request->getMethod());
$_SERVER['REQUEST_URI'] = $uri = str_replace('http://localhost', '', $request->getUri());
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';

if ($method === 'HEAD' || $method === 'GET') {
$_GET = $request->getParameters();
$_POST = [];
} else {
$_POST = $request->getParameters();
$_GET = [];
}

$httpRequest = $this->container->getByType(IRequest::class);
Expand Down

0 comments on commit cf80900

Please sign in to comment.