Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do it over https #15

Open
vk18vk opened this issue Jun 28, 2018 · 1 comment
Open

How to do it over https #15

vk18vk opened this issue Jun 28, 2018 · 1 comment

Comments

@vk18vk
Copy link

vk18vk commented Jun 28, 2018

it works fine for http but how do we get it done for https

@budavariam
Copy link

budavariam commented Oct 9, 2019

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{},
    },
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants