Skip to content

Commit

Permalink
Fix issue where the body was not close when doing http request
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Jan 20, 2022
1 parent 5a30dba commit 563db52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func GetBodyInWebsite(url string, proxy func(*http.Request) (*url.URL, error), h
return "", -1, err
}
body, _ := ioutil.ReadAll(resp.Body)
resp.Body.Close()
return string(body), resp.StatusCode, nil
}

Expand Down

0 comments on commit 563db52

Please # to comment.