Просмотр исходного кода

no_proxy environment variable
Author: jgg
Date: 1999-10-18 03:18:40 GMT
no_proxy environment variable

Arch Librarian лет назад: 22
Родитель
Сommit
9e2a06ff63
3 измененных файлов с 26 добавлено и 3 удалено
  1. 2 2
      cmdline/acqprogress.cc
  2. 2 0
      debian/changelog
  3. 22 1
      methods/http.cc

+ 2 - 2
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 " <<

+ 2 - 0
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 <jgg@debian.org>  Fri,  3 Sep 1999 09:04:28 -0700
  

+ 22 - 1
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;