Skip to content

Commit

Permalink
Fix ServerRequest::input() incorrectly being set to "php://input"
Browse files Browse the repository at this point in the history
Closes #9975
  • Loading branch information
ADmad committed Jan 5, 2017
1 parent 230bc8a commit 5d061ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Http/ServerRequestFactory.php
Expand Up @@ -50,7 +50,6 @@ public static function fromGlobals(
'environment' => $server,
'uri' => $uri,
'files' => $files,
'input' => 'php://input',
'cookies' => $cookies ?: $_COOKIE,
'query' => $query ?: $_GET,
'post' => $body ?: $_POST,
Expand Down
11 changes: 11 additions & 0 deletions tests/TestCase/Http/ServerRequestFactoryTest.php
Expand Up @@ -45,6 +45,17 @@ public function tearDown()
$_SERVER = $this->server;
}

/**
* Test fromGlobals input
*
* @return void
*/
public function testFromGlobalsInput()
{
$res = ServerRequestFactory::fromGlobals();
$this->assertSame('', $res->input());
}

/**
* Test fromGlobals includes the session
*
Expand Down

0 comments on commit 5d061ae

Please sign in to comment.