Fixed pecl bug #16817 (Proxy-Auth. and WWW-Auth. credentials mixed after connection...
authorMichael Wallner <mike@php.net>
Wed, 2 Sep 2009 12:07:00 +0000 (12:07 +0000)
committerMichael Wallner <mike@php.net>
Wed, 2 Sep 2009 12:07:00 +0000 (12:07 +0000)
http_request_api.c
package2.xml
php_http.h

index ef62218a47aced31719d3d6f012090aa64fcae6a..9d7e2d00f377885d12aa6d61ca982334862cb358 100644 (file)
@@ -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
index e33b8074baa598c979d6b12349418edbf2351878..6896963f80a7952f0443399c038bad07724578d5 100644 (file)
@@ -30,7 +30,7 @@ support. Parallel requests are available for PHP 5 and greater.
  </lead>
  <date>2009-08-13</date>
  <version>
-  <release>1.6.5</release>
+  <release>1.6.6</release>
   <api>1.6.0</api>
  </version>
  <stability>
@@ -39,8 +39,7 @@ support. Parallel requests are available for PHP 5 and greater.
  </stability>
  <license>BSD, revised</license>
  <notes><![CDATA[
-* Fixed PHP5.1 build
-* Fixed http_get_request_body[_stream]() with FastCGI SAPI
+Fixed bug #16817 (Proxy-Auth. and WWW-Auth. credentials mixed after connection reuse)
 ]]></notes>
  <contents>
   <dir name="/">
index 2e6ec8258838d5dbcd9d2e80d60bf1dbabac4270..5208da38bdd2652f4f2055b82a1190372d4d5644 100644 (file)
@@ -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"