Skip to content

Commit 62d2ea8

Browse files
author
Kenneth Reitz
committed
default chunk size for .content much bigger
1 parent 53d60ca commit 62d2ea8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

requests/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
pass
4242

4343
REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)
44-
44+
CONTENT_CHUNK_SIZE = 10 * 1024
4545

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

781781
except AttributeError:
782782
self._content = None

0 commit comments

Comments
 (0)