Close the reponse body after reading data (#11594)

Close the reponse body after reading data

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin(尹文开) 2020-04-14 01:19:40 +08:00 committed by GitHub
parent 4b4091b217
commit f972f2989c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ func (a *authorizer) initialize(u *url.URL) error {
if err != nil {
return err
}
defer resp.Body.Close()
challenges := challenge.ResponseChallenges(resp)
// no challenge, mean no auth