Skip to content

Commit

Permalink
Add 'b' flag to web SAPI streams
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jun 3, 2019
1 parent d8cc314 commit 33daa23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/functions.php
Expand Up @@ -74,7 +74,7 @@ function getInputBufferStream(): ResourceInputStream
$stream = Loop::getState($key);

if (!$stream) {
$stream = new ResourceInputStream(\fopen('php://input', 'r'));
$stream = new ResourceInputStream(\fopen('php://input', 'rb'));
Loop::setState($key, $stream);
}

Expand All @@ -93,7 +93,7 @@ function getOutputBufferStream(): ResourceOutputStream
$stream = Loop::getState($key);

if (!$stream) {
$stream = new ResourceOutputStream(\fopen('php://output', 'w'));
$stream = new ResourceOutputStream(\fopen('php://output', 'wb'));
Loop::setState($key, $stream);
}

Expand Down

0 comments on commit 33daa23

Please sign in to comment.