Skip to content

Commit

Permalink
default chunk size for .content much bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed May 2, 2012
1 parent 53d60ca commit 62d2ea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions requests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
pass

REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)

CONTENT_CHUNK_SIZE = 10 * 1024

class Request(object):
"""The :class:`Request <Request>` object. It carries out all functionality of
Expand Down Expand Up @@ -776,7 +776,7 @@ def content(self):
if self.status_code is 0:
self._content = None
else:
self._content = bytes().join(self.iter_content()) or bytes()
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()

except AttributeError:
self._content = None
Expand Down

0 comments on commit 62d2ea8

Please sign in to comment.