Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
martian: fix connection hangs in mitm mode
A regression was introduced in 9cc9854 that allowed use of HTTP/2 inside MITM. This patch adds the following to all http.Transport instances t.TLSNextProto = make(map[string]func(string, *tls.Conn) http.RoundTripper) Interestingly with that t = t.Clone() we get an error forwarder encountered an unexpected error net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x12\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x80\x00\x04\x00\x01\x00\x00\x00\x05\x00\xff\xff\xff\x00\x00\x04\b\x00\x00\x00\x00\x00\x7f\xff\x00\x00\x00\x00\b\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
- Loading branch information