Skip to content
New issue

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

Wrap ioutil.ReadAll() with io.LimitReader() #148

Open
atc0005 opened this issue Feb 15, 2022 · 0 comments
Open

Wrap ioutil.ReadAll() with io.LimitReader() #148

atc0005 opened this issue Feb 15, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Feb 15, 2022

responseData, err := ioutil.ReadAll(response.Body)

Wrap with io.LimitReader() to protect against a potentially large response. The expected response is very small, but applying any limit should be an improvement.

@atc0005 atc0005 added the enhancement New feature or request label Feb 15, 2022
@atc0005 atc0005 added this to the Future milestone Feb 15, 2022
@atc0005 atc0005 self-assigned this Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant