From c53e1a81db0b2e1fff838f8185960bc04fbffa77 Mon Sep 17 00:00:00 2001 From: aemous Date: Tue, 8 Sep 2026 09:47:26 -0400 Subject: [PATCH 1/3] Fix regression for IncompleteReadError while streaming object from S3. --- awscli/botocore/httpsession.py | 1 + 1 file changed, 1 insertion(+) diff --git a/awscli/botocore/httpsession.py b/awscli/botocore/httpsession.py index dcddba5ae90f..ae657c65acdb 100644 --- a/awscli/botocore/httpsession.py +++ b/awscli/botocore/httpsession.py @@ -477,6 +477,7 @@ def send(self, request): preload_content=False, decode_content=False, chunked=self._chunked(request.headers), + enforce_content_length=False, ) http_response = botocore.awsrequest.AWSResponse( From f17f3ab4b846f82b063831ae8450d8ce1c1f2b15 Mon Sep 17 00:00:00 2001 From: aemous Date: Tue, 8 Sep 2026 09:52:01 -0400 Subject: [PATCH 2/3] Add changelog entry. --- .changes/next-release/bugfix-HTTP-36336.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/next-release/bugfix-HTTP-36336.json diff --git a/.changes/next-release/bugfix-HTTP-36336.json b/.changes/next-release/bugfix-HTTP-36336.json new file mode 100644 index 000000000000..8599b0a0b767 --- /dev/null +++ b/.changes/next-release/bugfix-HTTP-36336.json @@ -0,0 +1,5 @@ +{ + "type": "bugfix", + "category": "HTTP", + "description": "Fixes regression where ``Content-Length`` validation is moved back to ``botocore`` from ``urllib3``. This re-enables functionality that depends on ``botocore``'s validation, such as resilient streaming from S3 to ``stdout`` in the case of an ``IncompleteRead``." +} From 7455462189fdd5f788bb61128d6f48de173b8d7d Mon Sep 17 00:00:00 2001 From: aemous Date: Tue, 8 Sep 2026 12:17:36 -0400 Subject: [PATCH 3/3] Update tests based on new call to urllib3. --- tests/unit/botocore/test_http_session.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/botocore/test_http_session.py b/tests/unit/botocore/test_http_session.py index 1165f3fdcc53..e212d00fda3f 100644 --- a/tests/unit/botocore/test_http_session.py +++ b/tests/unit/botocore/test_http_session.py @@ -146,6 +146,7 @@ def assert_request_sent( preload_content=False, decode_content=False, chunked=chunked, + enforce_content_length=False, ) def _assert_manager_call(self, manager, *assert_args, **assert_kwargs):