From: Felipe Pena Date: Tue, 20 Oct 2009 12:05:54 +0000 (+0000) Subject: - Merge fixes (build fix and memleak) X-Git-Tag: RELEASE_1_6_6~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b26ea275a05992893f3de08d694f009df2091164;p=m6w6%2Fext-http - Merge fixes (build fix and memleak) --- diff --git a/http_request_api.c b/http_request_api.c index 9d7e2d0..176dc29 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -459,8 +459,10 @@ PHP_HTTP_API void _http_request_defaults(http_request *request) HTTP_CURL_OPT(CURLOPT_PROXYPORT, 0L); HTTP_CURL_OPT(CURLOPT_PROXYTYPE, 0L); /* libcurl < 7.19.6 does not clear auth info with USERPWD set to NULL */ +#if HTTP_CURL_VERSION(7,19,1) HTTP_CURL_OPT(CURLOPT_PROXYUSERNAME, NULL); HTTP_CURL_OPT(CURLOPT_PROXYPASSWORD, NULL); +#endif HTTP_CURL_OPT(CURLOPT_PROXYAUTH, 0L); HTTP_CURL_OPT(CURLOPT_DNS_CACHE_TIMEOUT, 60L); HTTP_CURL_OPT(CURLOPT_IPRESOLVE, 0); @@ -486,8 +488,10 @@ PHP_HTTP_API void _http_request_defaults(http_request *request) HTTP_CURL_OPT(CURLOPT_LOCALPORTRANGE, 0L); #endif /* libcurl < 7.19.6 does not clear auth info with USERPWD set to NULL */ +#if HTTP_CURL_VERSION(7,19,1) HTTP_CURL_OPT(CURLOPT_USERNAME, NULL); HTTP_CURL_OPT(CURLOPT_PASSWORD, NULL); +#endif HTTP_CURL_OPT(CURLOPT_HTTPAUTH, 0L); HTTP_CURL_OPT(CURLOPT_ENCODING, NULL); #if HTTP_CURL_VERSION(7,16,2) diff --git a/http_response_object.c b/http_response_object.c index e638353..33dbee6 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -670,6 +670,7 @@ PHP_METHOD(HttpResponse, getStream) if (return_value_used) { zval *stream = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 TSRMLS_CC))); RETVAL_RESOURCE(Z_LVAL_P(stream)); + zval_ptr_dtor(&stream); } } /* }}} */