]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #29727 (Added missing CURL authentication directives).
authorIlia Alshanetsky <iliaa@php.net>
Wed, 18 Aug 2004 21:30:40 +0000 (21:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 18 Aug 2004 21:30:40 +0000 (21:30 +0000)
NEWS
ext/curl/curl.c

diff --git a/NEWS b/NEWS
index 749a1efe0fce7b832fc44ca77e818c9465d11d16..cef0f3d2672c160adb2a6f8f5cdc852d6f737bbf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, Version 4.3.9
 - Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
+- Fixed bug #29727 (Added missing CURL authentication directives). (Ilia)
 - Fixed bug #29719 (fgetcsv() has problem parsing strings ending with escaped
   enclosures). (Ilia)
 - Fixed bug #29599 (domxml_error segfaults another apache module). (Rob)
index 549441ef0eb0d4334d310add3f2fcc4abbddd0e4..e3fa882e08d4a93bf0536733b5e33fbe9b918f7e 100644 (file)
@@ -205,6 +205,21 @@ PHP_MINIT_FUNCTION(curl)
        REGISTER_CURL_CONSTANT(CURLOPT_ENCODING);
 #endif
                
+#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
+       REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
+       /* http authentication options */
+       REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
+       REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
+       REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
+       REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
+       REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
+       REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
+#endif
+
+#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 7.10.7 */
+       REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH);
+#endif
+
        /* Constants effecting the way CURLOPT_CLOSEPOLICY works */
        REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
        REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
@@ -764,6 +779,12 @@ PHP_FUNCTION(curl_setopt)
                case CURLOPT_HTTPGET:
                case CURLOPT_HTTP_VERSION:
                case CURLOPT_CRLF:
+#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
+               case CURLOPT_HTTPAUTH:
+#endif
+#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 7.10.7 */
+               case CURLOPT_PROXYAUTH:
+#endif
                        convert_to_long_ex(zvalue);
                        error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
                        break;