[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [meek/utls_2] Have makeRoundTripper take a URL, not a whole Request.
commit 24b8bac89e1941041bc826b2a7161e229ea73fc1
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits