We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I tried to use this library with concurrent api calls, I sometimes get an error 401.
url, user, password := "http://www.example.com/secrets", "robpike", "pw123" client := &http.Client{ Transport: ntlmssp.Negotiator{ RoundTripper:&http.Transport{}, }, } var wg sync.WaitGroup for i := 0; i < 10; i++ { wg.Add(1) go func() { defer wg.Done() req, _ := http.NewRequest("GET", url, nil) req.SetBasicAuth(user, password) res, _ := client.Do(req) fmt.Println(resp.StatusCode) }() } wg.Wait()
If I make sure that the client only uses 1 active connection, I don't get any error. So I'm guessing this is a bug, right?
client := &http.Client{ Transport: ntlmssp.Negotiator{ RoundTripper:&http.Transport{ MaxConnsPerHost: 1, // limit connections }, }, }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I tried to use this library with concurrent api calls, I sometimes get an error 401.
If I make sure that the client only uses 1 active connection, I don't get any error. So I'm guessing this is a bug, right?
The text was updated successfully, but these errors were encountered: