1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-11-27 04:14:49 +01:00

Add 'b' flag to web SAPI streams

This commit is contained in:
Niklas Keller 2019-06-03 23:05:11 +02:00
parent d8cc314d62
commit 33daa23ab1

View File

@ -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);
}
@ -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);
}