From 3b62ca2637953861a187d7838a162f8ef41a4427 Mon Sep 17 00:00:00 2001 From: Marcel Gebhardt Date: Wed, 19 Sep 2018 09:08:13 +0200 Subject: [PATCH] fix: do not read response body after successful authentication --- ntlm.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ntlm.go b/ntlm.go index 318cbff..f240697 100644 --- a/ntlm.go +++ b/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))