Attempt to fix #189 and #130: disable Amazon workaround when using proxy.

This commit is contained in:
Andrey Smirnov
2015-02-03 21:49:55 +03:00
parent 403c7272cd
commit 1b0eb9d45a
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -146,7 +146,11 @@ func (downloader *downloaderImpl) handleTask(task *downloadTask) {
return
}
req.URL.Opaque = strings.Replace(req.URL.RequestURI(), "+", "%2b", -1)
proxyURL, _ := downloader.client.Transport.(*http.Transport).Proxy(req)
if proxyURL == nil && (req.URL.Scheme == "http" || req.URL.Scheme == "https") {
req.URL.Opaque = strings.Replace(req.URL.RequestURI(), "+", "%2b", -1)
req.URL.RawQuery = ""
}
resp, err := downloader.client.Do(req)
if err != nil {
+1 -1
View File
@@ -1,3 +1,3 @@
Downloading http://security.debian.org/dists/wheezy/updates/InRelease...
Downloading http://security.debian.org/dists/wheezy/updates/Release...
ERROR: unable to fetch mirror: http://security.debian.org/dists/wheezy/updates/Release: Get http:/dists/wheezy/updates/Release: http: error connecting to proxy http://127.0.0.1:3137: dial tcp 127.0.0.1:3137: connection refused
ERROR: unable to fetch mirror: http://security.debian.org/dists/wheezy/updates/Release: Get http://security.debian.org/dists/wheezy/updates/Release: http: error connecting to proxy http://127.0.0.1:3137: dial tcp 127.0.0.1:3137: connection refused