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:
parent
d8cc314d62
commit
33daa23ab1
@ -74,7 +74,7 @@ function getInputBufferStream(): ResourceInputStream
|
|||||||
$stream = Loop::getState($key);
|
$stream = Loop::getState($key);
|
||||||
|
|
||||||
if (!$stream) {
|
if (!$stream) {
|
||||||
$stream = new ResourceInputStream(\fopen('php://input', 'r'));
|
$stream = new ResourceInputStream(\fopen('php://input', 'rb'));
|
||||||
Loop::setState($key, $stream);
|
Loop::setState($key, $stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ function getOutputBufferStream(): ResourceOutputStream
|
|||||||
$stream = Loop::getState($key);
|
$stream = Loop::getState($key);
|
||||||
|
|
||||||
if (!$stream) {
|
if (!$stream) {
|
||||||
$stream = new ResourceOutputStream(\fopen('php://output', 'w'));
|
$stream = new ResourceOutputStream(\fopen('php://output', 'wb'));
|
||||||
Loop::setState($key, $stream);
|
Loop::setState($key, $stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user