File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "path"
1212 "sync"
1313 "time"
14+ "crypto/tls"
1415)
1516
1617// HTMLTest struct, A html testing session, user options are passed in and
@@ -42,7 +43,12 @@ func Test(optsUser map[string]interface{}) *HTMLTest {
4243 (hT .opts .LogSort == "seq" ))
4344
4445 transport := & http.Transport {
45- TLSNextProto : nil , // Disable HTTP/2, "write on closed buffer" errors
46+ // Disable HTTP/2, this is required due to a number of edge cases where http negotiates H2, but something goes
47+ // wrong when actually using it. Downgrading to H1 when this issue is hit is not yet supported so we use the
48+ // following to disable H2 support:
49+ // > Programs that must disable HTTP/2 can do so by setting Transport.TLSNextProto ... to a non-nil, empty map.
50+ // See issue #49
51+ TLSNextProto : make (map [string ]func (authority string , c * tls.Conn ) http.RoundTripper ),
4652 }
4753 hT .httpClient = & http.Client {
4854 // Durations are in nanoseconds
You can’t perform that action at this time.
0 commit comments