net/tshttpproxy: discard secondary Windows proxies for now

reviewable/pr710/r1
Brad Fitzpatrick 2020-08-24 09:21:33 -07:00
parent 44598e3e89
commit 9be1917c5b
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,10 @@ func proxyFromWinHTTP(req *http.Request) (*url.URL, error) {
return nil, nil
}
if v != "" {
// Discard all but first proxy value for now.
if i := strings.Index(v, ";"); i != -1 {
v = v[:i]
}
if !strings.HasPrefix(v, "https://") {
v = "http://" + v
}