From c8cc87c3f5527c386bba2ad4a27da757f812664c Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Wed, 3 Aug 2016 10:20:55 -0700 Subject: [PATCH] pkg/transport: update scheme to unix copying URL --- pkg/transport/transport.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/transport/transport.go b/pkg/transport/transport.go index ca9ccfd80..4a7fe69d2 100644 --- a/pkg/transport/transport.go +++ b/pkg/transport/transport.go @@ -64,7 +64,8 @@ func NewTransport(info TLSInfo, dialtimeoutd time.Duration) (*http.Transport, er } func (urt *unixTransport) RoundTrip(req *http.Request) (*http.Response, error) { - req2 := *req - req2.URL.Scheme = strings.Replace(req.URL.Scheme, "unix", "http", 1) + url := *req.URL + req.URL = &url + req.URL.Scheme = strings.Replace(req.URL.Scheme, "unix", "http", 1) return urt.Transport.RoundTrip(req) }