mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
a68e5d94fa
commit
81bcc47041
1 changed files with 3 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cmd/internal/objfile"
|
"cmd/internal/objfile"
|
||||||
|
|
||||||
"github.com/google/pprof/driver"
|
"github.com/google/pprof/driver"
|
||||||
"github.com/google/pprof/profile"
|
"github.com/google/pprof/profile"
|
||||||
)
|
)
|
||||||
|
|
@ -72,7 +73,8 @@ func getProfile(source string, timeout time.Duration) (*profile.Profile, error)
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
ResponseHeaderTimeout: timeout + 5*time.Second,
|
ResponseHeaderTimeout: timeout + 5*time.Second,
|
||||||
TLSClientConfig: tlsConfig,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
TLSClientConfig: tlsConfig,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
resp, err := client.Get(source)
|
resp, err := client.Get(source)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue