From 9e2a06ff63968286395f3426b689cf7c3914a883 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:54:54 +0000 Subject: no_proxy environment variable Author: jgg Date: 1999-10-18 03:18:40 GMT no_proxy environment variable --- cmdline/acqprogress.cc | 4 ++-- debian/changelog | 2 ++ methods/http.cc | 23 ++++++++++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index 556b8869b..2f7a9c4fc 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acqprogress.cc,v 1.17 1999/08/04 05:37:18 jgg Exp $ +// $Id: acqprogress.cc,v 1.18 1999/10/18 03:18:40 jgg Exp $ /* ###################################################################### Acquire Progress - Command line progress meter @@ -123,7 +123,7 @@ void AcqTextStatus::Stop() return; if (Quiet <= 0) - cout << '\r' << BlankLine << '\r'; + cout << '\r' << BlankLine << '\r' << flush; if (FetchedBytes != 0 && _error->PendingError() == false) cout << "Fetched " << SizeToStr(FetchedBytes) << "B in " << diff --git a/debian/changelog b/debian/changelog index 070ce3af7..0a2ef08cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ apt (0.3.13.1) unstable; urgency=low event of a failure Closes: #47112 * Retries for source archives too Closes: #47529 * Unmounts CDROMs iff it mounted them Closes: #45299 + * Checks for the partial directories before doing downloads Closes: #47392 + * no_proxy environment variable (http only!) Closes: #43476 -- Jason Gunthorpe Fri, 3 Sep 1999 09:04:28 -0700 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; -- cgit v1.2.3