]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: use proxy from environment
authorMichel Lespinasse <walken@google.com>
Sun, 19 Mar 2017 02:02:20 +0000 (19:02 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 19 Mar 2017 05:45:51 +0000 (05:45 +0000)
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>

src/cmd/pprof/pprof.go

index 5a6e1c14235d8eda42f78e335b4a3818857f7658..24bec07d9752cd32d5a1b35c66675510247e1176 100644 (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)