diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-08-19 18:19:08 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-08 12:23:24 +0100 |
commit | 20e75329f2adb11dd231852c061926d0e4080929 (patch) | |
tree | e4a41a2393d16ba7f74ecd5c8810a09a59580f65 /ext/pdo_mysql/mysql_statement.c | |
parent | 65f5573bc82108bbaf2727ffa11575f3292d736f (diff) | |
download | php-git-20e75329f2adb11dd231852c061926d0e4080929.tar.gz |
Fix #48725: Support for flushing in zlib stream
When `php_zlib_deflate_filter()` is called with `PSFS_FLAG_FLUSH_INC`
but without new buckets being available (e.g. because a user calls
`rewind()` after writing to the stream), we have to make sure that any
pending data are flushed. This could basically be done like in the
attached patch[1], but that could cause unnessary flushes, which can be
harmful for compression, and adds unnecessary flush markers to the
stream. Thus, we use the `php_zlib_filter_data.finished` field, which
has not been used for `zlib.deflate` filters, and properly keep track
of the need to flush.
[1] <https://bugs.php.net/patch-display.php?bug_id=48725&patch=zlib-filter-flush-fix.patch&revision=latest>
Closes GH-6019.
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
0 files changed, 0 insertions, 0 deletions