[downloader:http] add 'consume-content' option
* fix connection not being released when the response is neither successful nor retried * add the ability to consume the HTTP response body instead of closing the connection reference: https://docs.python-requests.org/en/latest/user/advanced/#body-content-workflow
This commit is contained in:
@@ -3616,6 +3616,25 @@ Description
|
||||
contains JPEG/JFIF data.
|
||||
|
||||
|
||||
downloader.http.consume-content
|
||||
---------------------------------
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
``false``
|
||||
Description
|
||||
Controls the behavior when an HTTP response is considered
|
||||
unsuccessful
|
||||
|
||||
If the value is ``true``, consume the response body. This
|
||||
avoids closing the connection and therefore improves connection
|
||||
reuse.
|
||||
|
||||
If the value is ``false``, immediately close the connection
|
||||
without reading the response. This can be useful if the server
|
||||
is known to send large bodies for error responses.
|
||||
|
||||
|
||||
downloader.http.chunk-size
|
||||
--------------------------
|
||||
Type
|
||||
|
||||
Reference in New Issue
Block a user