fix: do not read response body after successful authentication
This commit is contained in:
committed by
Marcel Gebhardt
parent
428a29c33a
commit
3b62ca2637
6
ntlm.go
6
ntlm.go
@@ -103,12 +103,6 @@ func WrapDialContext(dialContext DialContext, proxyAddress, proxyUsername, proxy
|
||||
debugf("ntlm> Could not read response from proxy: %s", err)
|
||||
return conn, err
|
||||
}
|
||||
_, err = ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
debugf("ntlm> Could not read response body from proxy: %s", err)
|
||||
return conn, err
|
||||
}
|
||||
resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
debugf("ntlm> Expected %d as return status, got: %d", http.StatusOK, resp.StatusCode)
|
||||
return conn, errors.New(http.StatusText(resp.StatusCode))
|
||||
|
Reference in New Issue
Block a user