Skip to content

Commit

Permalink
Merge f82bcbc into e4a8d08
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelto committed May 23, 2018
2 parents e4a8d08 + f82bcbc commit d59a7d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Bridge/Psr7RequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

use Swoole\Http\Request as SwooleRequest;
use Zend\Diactoros\ServerRequest;
use Zend\Diactoros\Stream;

class Psr7RequestBuilder
{
public function build(SwooleRequest $swooleRequest)
{
$body = (string) $swooleRequest->rawcontent();
$rawContent = (string) $swooleRequest->rawcontent();

if (empty($body)) {
$body = 'php://input';
}
$body = new Stream('php://memory', 'r+b');
$body->write($rawContent);

return new ServerRequest(
$this->buildServerParams($swooleRequest),
Expand Down

0 comments on commit d59a7d3

Please sign in to comment.