Remove uneccesary request_body_tempfile_limit override from webob #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
request_body_tempfile_limit
key is only used in a single place in webapp2:Specifically, in webob's
_copy_body_tempfile
, which cancels the use of a tempfile if the content is too small:Setting this key to zero has the unintended effect of never using a tempfile, which will cause webob's
copy_body
function to always read a body straight into memory.This is clearly wrong, as the body is of arbitrary size and will crash if the request is larger than your available memory. Presumably, the intended effect was to have a body of any size be written to a tempfile, but webob already has a sensible default:
When chasing this back, it looks like this override was simply a mistake during import:
In summary, it is my belief that overriding this value causes the opposite of its intended effect and further is not necessary.