Open vk18vk opened 6 years ago
In my case I got an error for https connection in go: stream error: stream ID 1; HTTP_1_1_REQUIRED
According to https://golang.org/pkg/net/http/
Starting with Go 1.6, the http package has transparent support for the HTTP/2 protocol when using HTTPS. Programs that must disable HTTP/2 can do so by setting Transport.TLSNextProto (for clients) or Server.TLSNextProto (for servers) to a non-nil, empty map.
After I set TLSNextProto to a non-nil empty map it worked with https.
client := &http.Client{
Transport: ntlmssp.Negotiator{
RoundTripper: &http.Transport{
TLSNextProto: map[string]func(authority string, c *tls.Conn) http.RoundTripper{},
},
},
}
it works fine for http but how do we get it done for https