]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Jon Grubbs filed bug report #1249962 which identified a problem with NTLM on a
authorDaniel Stenberg <daniel@haxx.se>
Sun, 7 Aug 2005 22:59:06 +0000 (22:59 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 7 Aug 2005 22:59:06 +0000 (22:59 +0000)
HTTP proxy if an FTP URL was given. libcurl now properly switches to pure HTTP
internally when an HTTP proxy is used, even for FTP URLs. The problem would
also occur with other multi-pass auth methods.

CHANGES
RELEASE-NOTES
lib/url.c

diff --git a/CHANGES b/CHANGES
index 1801cf552e1d615b64a6d729f37f4ca61e9242ba..ab0ba5d244b79a4071189d6687c3cfb0a77b78bc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,12 @@
                                   Changelog
 
 
+Daniel (8 August 2005)
+- Jon Grubbs filed bug report #1249962 which identified a problem with NTLM on
+  a HTTP proxy if an FTP URL was given. libcurl now properly switches to pure
+  HTTP internally when an HTTP proxy is used, even for FTP URLs. The problem
+  would also occur with other multi-pass auth methods.
+
 Daniel (7 August 2005)
 - When curl is built with GnuTLS, curl-config didn't include "SSL" when
   --features was used.
index 114698340a72a0fa72cd2ae9a7ee68b153e659b5..b6a02ffea81ed1117e490bf55f3c4b1139590409 100644 (file)
@@ -5,7 +5,7 @@ Curl and libcurl 7.14.1
  Available command line options:           107
  Available curl_easy_setopt() options:     122
  Number of public functions in libcurl:    46
- Amount of public web site mirrors:        24
+ Amount of public web site mirrors:        25
  Number of known libcurl bindings:         31
  Number of contributors:                   437
 
@@ -18,6 +18,7 @@ This release includes the following changes:
 
 This release includes the following bugfixes:
 
+ o using NTLM over proxy with an FTP URL
  o curl-config --features now displays SSL when built with GnuTLS too
  o CURLOPT_HTTPGET, CURLOPT_POST and CURLOPT_HTTPPOST reset CURLOPT_NOBODY
  o builds fine on AmigaOS again
@@ -50,6 +51,6 @@ advice from friends like these:
 
  John McGowan, Georg Wicherski, Andres Garcia, Eric Cooper, Todd Kulesza,
  Tupone Alfredo, Gisle Vanem, David Shaw, Andrew Bushnell, Dan Fandrich,
- Adrian Schuur, Diego Casorran, Peteris Krumins
+ Adrian Schuur, Diego Casorran, Peteris Krumins, Jon Grubbs
 
         Thanks! (and sorry if I forgot to mention someone)
index f587b79f14473c1df8c10b6584316a951d33fb2d..3698affd17bb5b1758077ef5f7a84b4e4f086a26 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2651,9 +2651,13 @@ static CURLcode CreateConnection(struct SessionHandle *data,
         }
 
         if(proxy && *proxy) {
+          long bits = conn->protocol & (PROT_HTTPS|PROT_SSL);
           data->change.proxy = proxy;
           data->change.proxy_alloc=TRUE; /* this needs to be freed later */
           conn->bits.httpproxy = TRUE;
+
+          /* force this to become HTTP */
+          conn->protocol = PROT_HTTP | bits;
         }
       } /* if (!nope) - it wasn't specified non-proxy */
     } /* NO_PROXY wasn't specified or '*' */
@@ -2789,6 +2793,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
 #ifndef CURL_DISABLE_HTTP
       conn->curl_do = Curl_http;
       conn->curl_done = Curl_http_done;
+      conn->protocol = PROT_HTTP; /* switch to HTTP */
 #else
       failf(data, "FTP over http proxy requires HTTP support built-in!");
       return CURLE_UNSUPPORTED_PROTOCOL;