commit 24b8bac89e1941041bc826b2a7161e229ea73fc1 Author: David Fifield david@bamsoftware.com Date: Sat Feb 2 01:51:28 2019 -0700
Have makeRoundTripper take a URL, not a whole Request. --- meek-client/utls.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meek-client/utls.go b/meek-client/utls.go index bb288f7..7372c20 100644 --- a/meek-client/utls.go +++ b/meek-client/utls.go @@ -136,7 +136,7 @@ func (rt *UTLSRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) // On the first call, make an http.Transport or http2.Transport // as appropriate. var err error - rt.rt, err = makeRoundTripper(req, rt.clientHelloID, rt.config) + rt.rt, err = makeRoundTripper(req.URL, rt.clientHelloID, rt.config) if err != nil { return nil, err } @@ -145,8 +145,8 @@ func (rt *UTLSRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) return rt.rt.RoundTrip(req) }
-func makeRoundTripper(req *http.Request, clientHelloID *utls.ClientHelloID, cfg *utls.Config) (http.RoundTripper, error) { - addr, err := addrForDial(req.URL) +func makeRoundTripper(url *url.URL, clientHelloID *utls.ClientHelloID, cfg *utls.Config) (http.RoundTripper, error) { + addr, err := addrForDial(url) if err != nil { return nil, err }
tor-commits@lists.torproject.org