summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/methods/http.cc b/methods/http.cc
index c4a3f1629..34f2f1af5 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.38 1999/10/03 21:09:27 jgg Exp $
+// $Id: http.cc,v 1.39 1999/10/18 03:18:40 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -289,6 +289,27 @@ bool ServerState::Open()
else
Proxy = getenv("http_proxy");
+ // Parse no_proxy, a , seperated list of hosts
+ 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;
+ }
+ }
+
// Determine what host and port to use based on the proxy settings
int Port = 0;
string Host;