prepare release v3.2.0RC1 RELEASE_3_2_0_RC1
authorMichael Wallner <mike@php.net>
Mon, 9 Apr 2018 10:33:01 +0000 (12:33 +0200)
committerMichael Wallner <mike@php.net>
Mon, 9 Apr 2018 10:33:01 +0000 (12:33 +0200)
* 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

package.xml
src/php_http_buffer.c

index d811172651d92d791cb4fea5c87690a609ed70c6..62c1a584dd6def5d7208b72c68c189e44146fb66 100644 (file)
@@ -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="/">
index 9ff4065321150cb25a95589b9159bd780017a74d..c8650657ace95869f8ed6d014d250345213172c9 100644 (file)
@@ -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;
 }
 
@@ -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;
        }