<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/php-git.git/ext/standard/tests/streams, branch master</title>
<subtitle>git.php.net: repository/php-src.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/'/>
<entry>
<title>Merge branch 'PHP-8.0'</title>
<updated>2021-02-22T14:33:57+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2021-02-22T14:33:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=7f8ea83ef438fbcfa1cbc636d701491d4e773245'/>
<id>7f8ea83ef438fbcfa1cbc636d701491d4e773245</id>
<content type='text'>
* PHP-8.0:
  Fix #75776: Flushing streams with compression filter is broken
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-8.0:
  Fix #75776: Flushing streams with compression filter is broken
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-7.4' into PHP-8.0</title>
<updated>2021-02-22T14:32:17+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2021-02-22T14:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=b418fe266dd3ab56358469ed8290187959bad1a7'/>
<id>b418fe266dd3ab56358469ed8290187959bad1a7</id>
<content type='text'>
* PHP-7.4:
  Fix #75776: Flushing streams with compression filter is broken
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-7.4:
  Fix #75776: Flushing streams with compression filter is broken
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #75776: Flushing streams with compression filter is broken</title>
<updated>2021-02-22T14:28:46+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2021-02-16T18:36:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=963e50c8c48ecfbe7444445e5ca8e33530d630d0'/>
<id>963e50c8c48ecfbe7444445e5ca8e33530d630d0</id>
<content type='text'>
First, the `bzip2.compress` filter has the same issue as `zlib.deflate`
so we port the respective fix[1] to ext/bz2.

Second, there is still an issue, if a stream with an attached
compression filter is flushed before it is closed, without any writes
in between.  In that case, the compression is never finalized.  We fix
this by enforcing a `_php_stream_flush()` with the `closing` flag set
in `_php_stream_free()`, whenever a write filter is attached.  This
call is superfluous for most write filters, but does not hurt, even
when it is unnecessary.

[1] &lt;http://git.php.net/?p=php-src.git;a=commit;h=20e75329f2adb11dd231852c061926d0e4080929&gt;

Closes GH-6703.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First, the `bzip2.compress` filter has the same issue as `zlib.deflate`
so we port the respective fix[1] to ext/bz2.

Second, there is still an issue, if a stream with an attached
compression filter is flushed before it is closed, without any writes
in between.  In that case, the compression is never finalized.  We fix
this by enforcing a `_php_stream_flush()` with the `closing` flag set
in `_php_stream_free()`, whenever a write filter is attached.  This
call is superfluous for most write filters, but does not hurt, even
when it is unnecessary.

[1] &lt;http://git.php.net/?p=php-src.git;a=commit;h=20e75329f2adb11dd231852c061926d0e4080929&gt;

Closes GH-6703.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-8.0'</title>
<updated>2020-12-23T12:53:19+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2020-12-23T12:53:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=89d4b6b790472ca4081f61b8e6fbbea170ea00ad'/>
<id>89d4b6b790472ca4081f61b8e6fbbea170ea00ad</id>
<content type='text'>
* PHP-8.0:
  Fix #80384: limit read buffer size
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-8.0:
  Fix #80384: limit read buffer size
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-7.4' into PHP-8.0</title>
<updated>2020-12-23T12:52:45+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2020-12-23T12:52:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=7d9ddd61ecc2c99be8709cfa6b51e716343ad5da'/>
<id>7d9ddd61ecc2c99be8709cfa6b51e716343ad5da</id>
<content type='text'>
* PHP-7.4:
  Fix #80384: limit read buffer size
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-7.4:
  Fix #80384: limit read buffer size
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #80384: limit read buffer size</title>
<updated>2020-12-23T12:49:56+00:00</updated>
<author>
<name>Adam Seitz</name>
<email>adamjseitz@gmail.com</email>
</author>
<published>2020-12-01T23:40:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=70dfbe00684eb1c31d5b49f643e4736696c3b7df'/>
<id>70dfbe00684eb1c31d5b49f643e4736696c3b7df</id>
<content type='text'>
In the case of a stream with no filters, php_stream_fill_read_buffer
only reads stream-&gt;chunk_size into the read buffer. If the stream has
filters attached, it could unnecessarily buffer a large amount of data.

With this change, php_stream_fill_read_buffer only proceeds until either
the requested size or stream-&gt;chunk_size is available in the read buffer.

Co-authored-by: Christoph M. Becker &lt;cmbecker69@gmx.de&gt;

Closes GH-6444.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case of a stream with no filters, php_stream_fill_read_buffer
only reads stream-&gt;chunk_size into the read buffer. If the stream has
filters attached, it could unnecessarily buffer a large amount of data.

With this change, php_stream_fill_read_buffer only proceeds until either
the requested size or stream-&gt;chunk_size is available in the read buffer.

Co-authored-by: Christoph M. Becker &lt;cmbecker69@gmx.de&gt;

Closes GH-6444.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-8.0'</title>
<updated>2020-12-08T10:49:41+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2020-12-08T10:49:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=615197ae3d3a1f22173310ea80bbef40950a89c4'/>
<id>615197ae3d3a1f22173310ea80bbef40950a89c4</id>
<content type='text'>
* PHP-8.0:
  Fix #77069: stream filter loses final block of data
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-8.0:
  Fix #77069: stream filter loses final block of data
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-7.4' into PHP-8.0</title>
<updated>2020-12-08T10:49:28+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2020-12-08T10:49:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=d6ae0f010ec6bc4713dc9fe79e79947c2404a8dd'/>
<id>d6ae0f010ec6bc4713dc9fe79e79947c2404a8dd</id>
<content type='text'>
* PHP-7.4:
  Fix #77069: stream filter loses final block of data
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-7.4:
  Fix #77069: stream filter loses final block of data
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #77069: stream filter loses final block of data</title>
<updated>2020-12-08T10:47:49+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2020-09-22T14:02:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=65f5573bc82108bbaf2727ffa11575f3292d736f'/>
<id>65f5573bc82108bbaf2727ffa11575f3292d736f</id>
<content type='text'>
Reading from a stream may return greater than zero, but nonetheless the
stream's EOF flag may have been set.  We have to cater to this
condition by setting the close flag for filters.

We also have to cater to that change in the zlib.inflate filter:

If `inflate()` is called with flush mode `Z_FINISH`, but the output
buffer is not large enough to inflate all available data, it fails with
`Z_BUF_ERROR`.  However, `Z_BUF_ERROR` is not fatal; in fact, the zlib
manual states: "If deflate returns with Z_OK or Z_BUF_ERROR, this
function must be called again with Z_FINISH and more output space
(updated avail_out) but no more input data, until it returns with
Z_STREAM_END or an error."  Hence, we do so.

Closes GH-6001.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reading from a stream may return greater than zero, but nonetheless the
stream's EOF flag may have been set.  We have to cater to this
condition by setting the close flag for filters.

We also have to cater to that change in the zlib.inflate filter:

If `inflate()` is called with flush mode `Z_FINISH`, but the output
buffer is not large enough to inflate all available data, it fails with
`Z_BUF_ERROR`.  However, `Z_BUF_ERROR` is not fatal; in fact, the zlib
manual states: "If deflate returns with Z_OK or Z_BUF_ERROR, this
function must be called again with Z_FINISH and more output space
(updated avail_out) but no more input data, until it returns with
Z_STREAM_END or an error."  Hence, we do so.

Closes GH-6001.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-8.0'</title>
<updated>2020-11-12T15:43:57+00:00</updated>
<author>
<name>Christoph M. Becker</name>
<email>cmbecker69@gmx.de</email>
</author>
<published>2020-11-12T15:43:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/php-git.git/commit/?id=1e0610fe243fcfafd23ff821129cf4f35148ac64'/>
<id>1e0610fe243fcfafd23ff821129cf4f35148ac64</id>
<content type='text'>
* PHP-8.0:
  Strip trailing line breaks and periods from Windows error messages
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-8.0:
  Strip trailing line breaks and periods from Windows error messages
</pre>
</div>
</content>
</entry>
</feed>
