Closed mmatczuk closed 4 months ago
A regression was introduced in 9cc985423c4b49f98580ff7531ee671aa5f474da 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"
A regression was introduced in 9cc985423c4b49f98580ff7531ee671aa5f474da that allowed use of HTTP/2 inside MITM.
This patch adds the following to all http.Transport instances
Interestingly with that t = t.Clone() we get an error