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

Optional Read Limit for reading Response Body #71

Open
Kleissner opened this issue Oct 27, 2019 · 0 comments
Open

Optional Read Limit for reading Response Body #71

Kleissner opened this issue Oct 27, 2019 · 0 comments

Comments

@Kleissner
Copy link

There should be an optional read limit for reading the response body - otherwise a website could literally respond with GBs of data.

The problem was already raised (and incorrectly dismissed) in 2013 with issue #28. The solution is NOT to check first the content-length header, which may be incorrect and arbitrary.

The solution is to use an io.LimitReader if a read limit is defined. I'm going to create a pull request which implements that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant