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

From: Date: Wed, 15 Nov 2017 10:18:41 +0000
Subject: Bug #75515 [Ver->Asn]: "stream_copy_to_stream" doesn't stream anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212601@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: kalle@php.net Reported by: nicolas dot grekas+php at gmail dot com Summary: "stream_copy_to_stream" doesn't stream anymore -Status: Verified +Status: Assigned Type: Bug Package: Streams related Operating System: Ubuntu PHP Version: 7.2.0RC6 -Assigned To: +Assigned To: pollita Block user comment: N Private report: N New Comment: @Sara, this seems like it should be re-evaluated for 7.2 before GA Previous Comments: ------------------------------------------------------------------------ [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 (#212601) next »