8000 There's no reason not to preload chunked bodies. · python-telegram-bot/urllib3@af94b74 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 21, 2023. It is now read-only.

Commit af94b74

Browse files
committed
There's no reason not to preload chunked bodies.
1 parent 4197b68 commit af94b74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

urllib3/response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def __init__(self, body='', headers=None, status=0, version=0, reason=None,
130130
if "chunked" in encodings:
131131
self.chunked = True
132132

133-
# We certainly don't want to preload content when the response is chunked.
134-
if not self.chunked and preload_content and not self._body:
133+
# If requested, preload the body.
134+
if preload_content and not self._body:
135135
self._body = self.read(decode_content=decode_content)
136136

137137
def get_redirect_location(self):

0 commit comments

Comments
 (0)
0