Bug #75515 [Asn->Csd]: "stream_copy_to_stream" doesn't stream anymore

From: Date: Wed, 15 Nov 2017 14:36:26 +0000
Subject: Bug #75515 [Asn->Csd]: "stream_copy_to_stream" doesn't stream anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212603@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 Updated by: remi@php.net Reported by: nicolas dot grekas+php at gmail dot com Summary: "stream_copy_to_stream" doesn't stream anymore -Status: Assigned +Status: Closed Type: Bug Package: Streams related Operating System: Ubuntu PHP Version: 7.2.0RC6 Assigned To: pollita Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Applied in PHP-7.2.0 BTW, more feedback welcome on this one Previous Comments: ------------------------------------------------------------------------ [2017-11-15 10:18:40] kalle@php.net @Sara, this seems like it should be re-evaluated for 7.2 before GA ------------------------------------------------------------------------ [2017-11-14 19:00:25] kelunik@php.net @remi+sara: Why master only? Because the cherry-pick will happen later? ------------------------------------------------------------------------ [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

« previous php.bugs (#212603) next »