From: Michael Wallner Date: Wed, 2 Sep 2009 12:07:00 +0000 (+0000) Subject: Fixed pecl bug #16817 (Proxy-Auth. and WWW-Auth. credentials mixed after connection... X-Git-Tag: RELEASE_1_6_6~8 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=cfdce2d63829637d1f658bf67bddef7c68a532aa;p=m6w6%2Fext-http Fixed pecl bug #16817 (Proxy-Auth. and WWW-Auth. credentials mixed after connection reuse) --- diff --git a/http_request_api.c b/http_request_api.c index ef62218..9d7e2d0 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -458,7 +458,9 @@ PHP_HTTP_API void _http_request_defaults(http_request *request) HTTP_CURL_OPT(CURLOPT_PROXY, NULL); HTTP_CURL_OPT(CURLOPT_PROXYPORT, 0L); HTTP_CURL_OPT(CURLOPT_PROXYTYPE, 0L); - HTTP_CURL_OPT(CURLOPT_PROXYUSERPWD, NULL); + /* libcurl < 7.19.6 does not clear auth info with USERPWD set to NULL */ + HTTP_CURL_OPT(CURLOPT_PROXYUSERNAME, NULL); + HTTP_CURL_OPT(CURLOPT_PROXYPASSWORD, NULL); HTTP_CURL_OPT(CURLOPT_PROXYAUTH, 0L); HTTP_CURL_OPT(CURLOPT_DNS_CACHE_TIMEOUT, 60L); HTTP_CURL_OPT(CURLOPT_IPRESOLVE, 0); @@ -476,11 +478,16 @@ PHP_HTTP_API void _http_request_defaults(http_request *request) HTTP_CURL_OPT(CURLOPT_FORBID_REUSE, 0L); HTTP_CURL_OPT(CURLOPT_INTERFACE, NULL); HTTP_CURL_OPT(CURLOPT_PORT, 0L); +#if HTTP_CURL_VERSION(7,19,0) + HTTP_CURL_OPT(CURLOPT_ADDRESS_SCOPE, 0L); +#endif #if HTTP_CURL_VERSION(7,15,2) HTTP_CURL_OPT(CURLOPT_LOCALPORT, 0L); HTTP_CURL_OPT(CURLOPT_LOCALPORTRANGE, 0L); #endif - HTTP_CURL_OPT(CURLOPT_USERPWD, NULL); + /* libcurl < 7.19.6 does not clear auth info with USERPWD set to NULL */ + HTTP_CURL_OPT(CURLOPT_USERNAME, NULL); + HTTP_CURL_OPT(CURLOPT_PASSWORD, NULL); HTTP_CURL_OPT(CURLOPT_HTTPAUTH, 0L); HTTP_CURL_OPT(CURLOPT_ENCODING, NULL); #if HTTP_CURL_VERSION(7,16,2) @@ -494,6 +501,9 @@ PHP_HTTP_API void _http_request_defaults(http_request *request) HTTP_CURL_OPT(CURLOPT_USERAGENT, "PECL::HTTP/" PHP_HTTP_VERSION " (PHP/" PHP_VERSION ")"); HTTP_CURL_OPT(CURLOPT_HTTPHEADER, NULL); HTTP_CURL_OPT(CURLOPT_COOKIE, NULL); + HTTP_CURL_OPT(CURLOPT_COOKIESESSION, 0L); + HTTP_CURL_OPT(CURLOPT_COOKIEFILE, NULL); + HTTP_CURL_OPT(CURLOPT_COOKIEJAR, NULL); #if HTTP_CURL_VERSION(7,14,1) HTTP_CURL_OPT(CURLOPT_COOKIELIST, NULL); #endif diff --git a/package2.xml b/package2.xml index e33b807..6896963 100644 --- a/package2.xml +++ b/package2.xml @@ -30,7 +30,7 @@ support. Parallel requests are available for PHP 5 and greater. 2009-08-13 - 1.6.5 + 1.6.6 1.6.0 @@ -39,8 +39,7 @@ support. Parallel requests are available for PHP 5 and greater. BSD, revised diff --git a/php_http.h b/php_http.h index 2e6ec82..5208da3 100644 --- a/php_http.h +++ b/php_http.h @@ -15,7 +15,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_HTTP_VERSION "1.6.5" +#define PHP_HTTP_VERSION "1.6.6dev" #ifdef HAVE_CONFIG_H # include "config.h"