]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
[apt.git] / methods / http.cc
index 71a02e53a062e3a7bae2f22dd63dbfea34bdf2c0..96c4e3ca04cbd6e4802bff9c103124b8b0e78eca 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <utime.h>
 #include <unistd.h>
 #include <signal.h>
 #include <stdio.h>
@@ -97,8 +96,6 @@ void CircleBuf::Reset()
    is non-blocking.. */
 bool CircleBuf::Read(int Fd)
 {
-   unsigned long long BwReadMax;
-
    while (1)
    {
       // Woops, buffer is full
@@ -106,7 +103,7 @@ bool CircleBuf::Read(int Fd)
         return true;
 
       // what's left to read in this tick
-      BwReadMax = CircleBuf::BwReadLimit/BW_HZ;
+      unsigned long long const BwReadMax = CircleBuf::BwReadLimit/BW_HZ;
 
       if(CircleBuf::BwReadLimit) {
         struct timeval now;
@@ -798,7 +795,6 @@ bool HttpMethod::Configuration(string Message)
    PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth",
                                  PipelineDepth);
    Debug = _config->FindB("Debug::Acquire::http",false);
-   AutoDetectProxyCmd = _config->Find("Acquire::http::ProxyAutoDetect");
 
    // Get the proxy to use
    AutoDetectProxy();
@@ -811,6 +807,11 @@ bool HttpMethod::Configuration(string Message)
 /* */
 bool HttpMethod::AutoDetectProxy()
 {
+   // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old
+   // name without the dash ("-")
+   AutoDetectProxyCmd = _config->Find("Acquire::http::Proxy-Auto-Detect",
+                                      _config->Find("Acquire::http::ProxyAutoDetect"));
+
    if (AutoDetectProxyCmd.empty())
       return true;