summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:56:39 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:56:39 +0000
commitf8081133c528e8c91b533b4fab6f56ae42d51ecb (patch)
tree34c38c73de5695f344465ead1bfda734caa979d5 /methods/http.cc
parentfcc0e9d6791404a1fbb750acf3d5281149315d1d (diff)
Alfredo's no_proxy patch
Author: jgg Date: 2001-02-23 05:45:27 GMT Alfredo's no_proxy patch
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc26
1 files changed, 6 insertions, 20 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 7347e8349..9f4494dc7 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.47 2001/02/20 07:03:18 jgg Exp $
+// $Id: http.cc,v 1.48 2001/02/23 05:45:27 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -285,27 +285,13 @@ bool ServerState::Open()
else
Proxy = getenv("http_proxy");
- // Parse no_proxy, a , separated list of hosts
+ // Parse no_proxy, a , separated list of domains
if (getenv("no_proxy") != 0)
{
- const char *Start = getenv("no_proxy");
- for (const char *Cur = Start; true ; Cur++)
- {
- if (*Cur != ',' && *Cur != 0)
- continue;
- if (stringcasecmp(ServerName.Host.begin(),ServerName.Host.end(),
- Start,Cur) == 0)
- {
- Proxy = "";
- break;
- }
-
- Start = Cur + 1;
- if (*Cur == 0)
- break;
- }
- }
-
+ if (CheckDomainList(ServerName.Host,getenv("no_proxy")) == true)
+ Proxy = "";
+ }
+
// Determine what host and port to use based on the proxy settings
int Port = 0;
string Host;