Commit 81bcc470 authored by Michel Lespinasse's avatar Michel Lespinasse Committed by Brad Fitzpatrick

cmd/pprof: use proxy from environment

See #18736

Change-Id: I9c16357c05c16db677125d3077ee466b71559c7a
Reviewed-on: https://go-review.googlesource.com/38343Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a68e5d94
......@@ -22,6 +22,7 @@ import (
"time"
"cmd/internal/objfile"
"github.com/google/pprof/driver"
"github.com/google/pprof/profile"
)
......@@ -72,7 +73,8 @@ func getProfile(source string, timeout time.Duration) (*profile.Profile, error)
client := &http.Client{
Transport: &http.Transport{
ResponseHeaderTimeout: timeout + 5*time.Second,
TLSClientConfig: tlsConfig,
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: tlsConfig,
},
}
resp, err := client.Get(source)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment