1
0
mirror of https://github.com/golang/go synced 2024-11-23 15:50:07 -07:00

cmd/pprof: use proxy from environment

See #18736

Change-Id: I9c16357c05c16db677125d3077ee466b71559c7a
Reviewed-on: https://go-review.googlesource.com/38343
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Michel Lespinasse 2017-03-18 19:02:20 -07:00 committed by Brad Fitzpatrick
parent a68e5d94fa
commit 81bcc47041

View File

@ -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)