From 62d2ea80340de1ae146cce3c85490444a8fca047 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 2 May 2012 18:47:50 -0400 Subject: [PATCH] default chunk size for .content much bigger --- requests/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requests/models.py b/requests/models.py index ff0ef019..04d3ac8e 100644 --- a/requests/models.py +++ b/requests/models.py @@ -41,7 +41,7 @@ except ImportError: pass REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved) - +CONTENT_CHUNK_SIZE = 10 * 1024 class Request(object): """The :class:`Request ` object. It carries out all functionality of @@ -776,7 +776,7 @@ class Response(object): 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