Bug #75776 [PATCH]: Flushing streams with compression filter is broken

From: Date: Tue, 16 Feb 2021 18:45:44 +0000
Subject: Bug #75776 [PATCH]: Flushing streams with compression filter is broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232212@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75776&edit=1 ID: 75776 Patch added by: cmb@php.net Reported by: shestero at meta dot ua Summary: Flushing streams with compression filter is broken Status: Verified Type: Bug Package: Streams related Operating System: Debian PHP Version: 7.0.27 Assigned To: cmb Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Fix #75776: Flushing streams with compression filter is broken On GitHub: https://github.com/php/php-src/pull/6703 Patch: https://github.com/php/php-src/pull/6703.patch Previous Comments: ------------------------------------------------------------------------ [2021-02-16 18:02:19] cmb@php.net While having a closer look at the bzip2 issue, I noticed that the fix for the other bug does not fully resolve the flushing issue for zlib compression streams. Anyhow, this is not particularly related to php://output streams, but affects streams generally. Furthermore, not only fflush() triggers the misbehavior, but also other function calls, such as rewind(), which flush the stream internally. ------------------------------------------------------------------------ [2021-02-15 14:08:49] cmb@php.net With regard to zlib.deflate this is a duplicate of bug #48725, which is fixed as of PHP 7.4.14 and 8.0.1, respectively, but apparently bzip2.compress has the same problem. Recatogorizing as "streams related" since "filter related" is used too often for ext/filter. ------------------------------------------------------------------------ [2018-01-10 02:09:27] shestero at meta dot ua Commenting fflush solves the problem. I checked. ------------------------------------------------------------------------ [2018-01-10 02:08:28] shestero at meta dot ua Yes. Really commenting fflush solves the problem? But what's wrong with fflush? I process data streaming and sometimes fill it should be flushed after some portion is over. ------------------------------------------------------------------------ [2018-01-09 14:37:21] mike@php.net Seems to be caused by the fflush() call. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=75776 -- Edit this bug report at https://bugs.php.net/bug.php?id=75776&edit=1

« previous php.bugs (#232212) next »