]> granicus.if.org Git - curl/commitdiff
- Alexander Beedie provided the patch for a noproxy problem: If I have set
authorDaniel Stenberg <daniel@haxx.se>
Sat, 1 Aug 2009 11:02:10 +0000 (11:02 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 1 Aug 2009 11:02:10 +0000 (11:02 +0000)
  CURLOPT_NOPROXY to "*", or to a host that should not use a proxy, I actually
  could still end up using a proxy if a proxy environment variable was set.

CHANGES
RELEASE-NOTES
TODO-RELEASE
lib/url.c

diff --git a/CHANGES b/CHANGES
index 52995a6bf3d5f1e0a633642489a1238af718596b..6d7b833e89cf8c3071ae460d89106027655821de 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
 
                                   Changelog
 
+Daniel Stenberg (1 Aug 2009)
+- Alexander Beedie provided the patch for a noproxy problem: If I have set
+  CURLOPT_NOPROXY to "*", or to a host that should not use a proxy, I actually
+  could still end up using a proxy if a proxy environment variable was set.
+
 Daniel Stenberg (27 Jul 2009)
 - All the quote options (CURLOPT_QUOTE, CURLOPT_POSTQUOTE and
   CURLOPT_PREQUOTE) now accept a preceeding asterisk before the command to
index 1b94e20c1d6e8104f8e1e696150ae13ab71e3198..b715d5aef336afe3eb6286591bf502490b35eca6 100644 (file)
@@ -38,6 +38,7 @@ This release includes the following bugfixes:
  o improved the support for client certificates in libcurl+NSS
  o fix leak in gtls code
  o missing algorithms in libcurl+OpenSSL
+ o with noproxy set you could still get a proxy if a proxy env was set
 
 This release includes the following known bugs:
 
@@ -50,6 +51,6 @@ advice from friends like these:
  Andre Guibert de Bruet, Mike Crowe, Claes Jakobsson, John E. Malmberg,
  Aaron Oneal, Igor Novoseltsev, Eric Wong, Bill Hoffman, Daniel Steinberg,
  Fabian Keil, Michal Marek, Reuven Wachtfogel, Markus Koetter,
- Constantine Sapuntzakis, David Binderman, Johan van Selst
+ Constantine Sapuntzakis, David Binderman, Johan van Selst, Alexander Beedie
 
         Thanks! (and sorry if I forgot to mention someone)
index cda345f9a848142cb1e7b64fa26bc6908b324275..513ad81cd1d083a27e53b306cb8323ba974a13ee 100644 (file)
@@ -1,8 +1,6 @@
 To be addressed in 7.19.6 (planned release: August 2009)
 =========================
 
-246 - small logic error with CURLOPT_NOPROXY
-
 248 - "Pausing pipeline problems."
 
 249 - Wildcard cert name checking and null termination
index 5f209fe5eecb2f6af981070a29da51af58d539da..96db7e481ad54450f77fbc18b3a7ef48fa193e81 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4419,14 +4419,17 @@ static CURLcode create_conn(struct SessionHandle *data,
     }
   }
 
-  if(!proxy)
-    proxy = detect_proxy(conn);
-  else if(data->set.str[STRING_NOPROXY]) {
-    if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY])) {
+
+  if(data->set.str[STRING_NOPROXY] &&
+     check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY])) {
+    if(proxy) {
       free(proxy);  /* proxy is in exception list */
       proxy = NULL;
     }
   }
+  else if(!proxy)
+    proxy = detect_proxy(conn);
+
   if(proxy && !*proxy) {
     free(proxy);  /* Don't bother with an empty proxy string */
     proxy = NULL;