Merge pull request #4661 from ofek/patch-2

Response.content minor perf improvement
This commit is contained in:
Ian Stapleton Cordasco
2018-05-26 19:00:25 -05:00
committed by GitHub
+1 -1
View File
@@ -824,7 +824,7 @@ class Response(object):
if self.status_code == 0 or self.raw is None:
self._content = None
else:
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
self._content_consumed = True
# don't need to release the connection; that's been handled by urllib3