Skip to content
Myr

Merge pull request #2829 from dblia/getresponse-buffering

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Use buffering for HTTP responses on chunked requests

authored by Cory Benfield · committed by Cory Benfield · parents 6c2d09d, 8f59168 · Browse files · 1 file+9 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−1 removed

  • other:+9 added−1 removed

1 file+9 added−1 removed

modified:requests/adapters.py+9 added-1 removed
392 unmodified lines
393 low_conn.send(i)394 low_conn.send(b'\r\n')395 low_conn.send(b'0\r\n\r\n')396397 # Receive the response from the server398 try:399 # For Python 2.7+ versions, use buffering of HTTP400 # responses401 r = conn.getresponse(buffering=True)402 except TypeError:403 # For compatibility with Python 2.6 versions and back397 r = low_conn.getresponse()404 r = conn.getresponse()405406 resp = HTTPResponse.from_httplib(407 r,408 pool=conn,409 connection=low_conn,
38 unmodified lines