- Merge fixes (build fix and memleak)
authorFelipe Pena <felipe@php.net>
Tue, 20 Oct 2009 12:05:54 +0000 (12:05 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 20 Oct 2009 12:05:54 +0000 (12:05 +0000)
http_request_api.c
http_response_object.c

index 9d7e2d00f377885d12aa6d61ca982334862cb358..176dc298d82000c1e197d904a4e1689dbf4605a2 100644 (file)
@@ -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)
index e6383538c822e419b318bccd08f8efe95171d0cb..33dbee6671e053378db2be64171cd4f37c74e4ba 100644 (file)
@@ -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);
        }
 }
 /* }}} */