Skip to content

Commit

Permalink
make LimitedStream.read(-1) consistent with normal files
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt authored and mitsuhiko committed Sep 20, 2011
1 parent f9755f9 commit 2a66fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion werkzeug/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def read(self, size=None):
"""
if self._pos >= self.limit:
return self.on_exhausted()
if size is None:
if size is None or size == -1: # -1 is for consistence with file
size = self.limit
read = self._read(min(self.limit - self._pos, size))
self._pos += len(read)
Expand Down

0 comments on commit 2a66fdf

Please sign in to comment.