]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
When setting a proxy with environment variables and (for example) running
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Dec 2006 07:30:21 +0000 (07:30 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Dec 2006 07:30:21 +0000 (07:30 +0000)
'curl [URL]' with a URL without a protocol prefix, curl would not send a
correct request as it failed to add the protocol prefix.

CHANGES
RELEASE-NOTES
lib/url.c

diff --git a/CHANGES b/CHANGES
index c626016e09c3064f2ae5bc7c6c3e4cabbada7d2b..6f81cd2959b1bfa3da41a2dfd31c3d2b7f62dce6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
 
                                   Changelog
 
+Daniel (22 December 2006)
+- When setting a proxy with environment variables and (for example) running
+  'curl [URL]' with a URL without a protocol prefix, curl would not send a
+  correct request as it failed to add the protocol prefix.
+
 Daniel (21 December 2006)
 - Robson Braga Araujo reported bug #1618359
   (http://curl.haxx.se/bug/view.cgi?id=1618359) and subsequently provided a
index 251ccf7c1cfda6b6e1fe5afc43688428b2a93a76..71caea0ad5588771766b6c56d2a750de02d802c4 100644 (file)
@@ -37,6 +37,7 @@ This release includes the following bugfixes:
    libcurl to leak memory
  o no more SIGPIPE when GnuTLS is used
  o FTP downloading 2 zero byte files in a row
+ o using proxy and URLs without protocol prefixes
 
 Other curl-related news:
 
index 7b87a92c43f5ca6b2a51d1f3dc20db07d80eb46f..65ec4f1e2f899e24505ebbcafadbc95c23a9fe6b 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2951,7 +2951,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
         }
 
         if(proxy && *proxy) {
-          long bits = conn->protocol & (PROT_HTTPS|PROT_SSL);
+          long bits = conn->protocol & (PROT_HTTPS|PROT_SSL|PROT_MISSING);
           data->change.proxy = proxy;
           data->change.proxy_alloc=TRUE; /* this needs to be freed later */
           conn->bits.httpproxy = TRUE;