Bug #75515 [Com]: "stream_copy_to_stream" doesn't stream anymore
| From: | kelunik@php.net | Date: | Tue, 14 Nov 2017 19:00:27 +0000 |
| Subject: | Bug #75515 [Com]: "stream_copy_to_stream" doesn't stream anymore | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212587@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75515&edit=1
ID: 75515
Comment by: kelunik@php.net
Reported by: nicolas dot grekas+php at gmail dot com
Summary: "stream_copy_to_stream" doesn't stream anymore
Status: Verified
Type: Bug
Package: Streams related
Operating System: Ubuntu
PHP Version: 7.2.0RC6
Block user comment: N
Private report: N
New Comment:
@remi+sara: Why master only? Because the cherry-pick will happen later?
Previous Comments:
------------------------------------------------------------------------
[2017-11-14 06:08:09] remi@php.net
See https://github.com/php/php-src/commit/0a45e8f096a04464bda6277c6f3d0b5461737a27
(only in master for now)
------------------------------------------------------------------------
[2017-11-13 09:56:16] nicolas dot grekas+php at gmail dot com
Description:
------------
See test script.
This behavior change has been introduced in PHP7.2RC6, and can be fixed by the change on 710 of
main/streams/streams.c:
```
- if (!stream->wrapper || stream->wrapper->is_url) {
+ if (stream->wrapper != &php_plain_files_wrapper) {
```
Test script:
---------------
run on the shell:
php -r 'echo "ping"; stream_copy_to_stream(STDIN, STDOUT);'
then type something to populate stdin, and hit "enter".
On "enter", the input should be copied to the STDOUT.
But on RC6, this doesn't happen until STDIN is closed.
Expected result:
----------------
see test script
Actual result:
--------------
see test script
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75515&edit=1