Skip to content

Commit

Permalink
prepare release v3.2.0RC1
Browse files Browse the repository at this point in the history
* PHP-7.2 compatibility
* Fixed gh-issue #73: build fails with libidn and libidn2
+ Added brotli compression support
+ Implemented gh-issue #58: Notify observers before any request is built
  • Loading branch information
m6w6 committed Apr 9, 2018
1 parent 62791ac commit 9a02b1a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
15 changes: 9 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ https://mdref.m6w6.name/http
<email>mike@php.net</email>
<active>yes</active>
</lead>
<date>2017-04-04</date>
<date>2018-04-09</date>
<version>
<release>3.1.1dev</release>
<api>3.1.0</api>
<release>3.2.0RC1</release>
<api>3.2.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://copyfree.org/content/standard/licenses/2bsd/license.txt">BSD-2-Clause</license>
<notes><![CDATA[
* Fix gh-issue #65: http\Client::enqueue(): Could not enqueue request: The easy handle is already added to a multi handle (@rcanavan, Mike)
* PHP-7.2 compatibility
* Fixed gh-issue #73: build fails with libidn and libidn2
+ Added brotli compression support
+ Implemented gh-issue #58: Notify observers before any request is built
]]></notes>
<contents>
<dir name="/">
Expand Down
12 changes: 8 additions & 4 deletions src/php_http_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ PHP_HTTP_BUFFER_API size_t php_http_buffer_append(php_http_buffer_t *buf,
) {
return PHP_HTTP_BUFFER_NOMEM;
}
memcpy(buf->data + buf->used, append, append_len);
buf->used += append_len;
buf->free -= append_len;
if (append_len) {
memcpy(buf->data + buf->used, append, append_len);
buf->used += append_len;
buf->free -= append_len;
}
return append_len;
}

Expand Down Expand Up @@ -147,7 +149,9 @@ PHP_HTTP_BUFFER_API char *php_http_buffer_data(const php_http_buffer_t *buf,
char **into, size_t *len)
{
char *copy = ecalloc(1, buf->used + 1);
memcpy(copy, buf->data, buf->used);
if (buf->data) {
memcpy(copy, buf->data, buf->used);
}
if (into) {
*into = copy;
}
Expand Down

0 comments on commit 9a02b1a

Please sign in to comment.