X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_api.c;h=c43aa1abfa3cd3a013a368359f4e369dcf573227;hp=e9d39d7c0425ab7e8b5ac4495c6553249d32afb8;hb=419ba9235752d56f15b393fc7969316978c6c721;hpb=edc84b40eb2c5be04492fa98fec5833a030782eb diff --git a/http_request_api.c b/http_request_api.c index e9d39d7..c43aa1a 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -374,11 +374,12 @@ PHP_HTTP_API void _http_request_body_dtor(http_request_body *body TSRMLS_DC) /* }}} */ /* {{{ void http_request_body_free(http_request_body *) */ -PHP_HTTP_API void _http_request_body_free(http_request_body *body TSRMLS_DC) +PHP_HTTP_API void _http_request_body_free(http_request_body **body TSRMLS_DC) { - if (body) { - http_request_body_dtor(body); - efree(body); + if (*body) { + http_request_body_dtor(*body); + efree(*body); + *body = NULL; } } /* }}} */ @@ -467,7 +468,7 @@ PHP_HTTP_API STATUS _http_request_init(CURL *ch, http_request_method meth, char /* compress, empty string enables all supported if libcurl was build with zlib support */ if ((zoption = http_curl_getopt(options, "compress", IS_BOOL)) && Z_LVAL_P(zoption)) { #if defined(HTTP_HAVE_ZLIB) || defined(HAVE_ZLIB) - HTTP_CURL_OPT(ENCODING, "gzip;q=1.0, deflate;q=0.5, *;q=0"); + HTTP_CURL_OPT(ENCODING, "gzip;q=1.0, deflate;q=0.5, *;q=0.1"); #else HTTP_CURL_OPT(ENCODING, ""); #endif