diff --git a/packages/smithy-http/.changes/next-release/smithy-http-bugfix-0c383aa7346a4eb4b21cef8e2e0f201a.json b/packages/smithy-http/.changes/next-release/smithy-http-bugfix-0c383aa7346a4eb4b21cef8e2e0f201a.json new file mode 100644 index 000000000..41a1b01e0 --- /dev/null +++ b/packages/smithy-http/.changes/next-release/smithy-http-bugfix-0c383aa7346a4eb4b21cef8e2e0f201a.json @@ -0,0 +1,4 @@ +{ + "type": "bugfix", + "description": "Disabled automatic response decompression in `AIOHTTPClient`." +} diff --git a/packages/smithy-http/src/smithy_http/aio/aiohttp.py b/packages/smithy-http/src/smithy_http/aio/aiohttp.py index 3bfcbbeb3..5a330931d 100644 --- a/packages/smithy-http/src/smithy_http/aio/aiohttp.py +++ b/packages/smithy-http/src/smithy_http/aio/aiohttp.py @@ -65,7 +65,13 @@ def __init__( """ _assert_aiohttp() self._config = client_config or AIOHTTPClientConfig() - self._session = _session or aiohttp.ClientSession() + # Disable transparent response decompression and advertise + # 'identity' to request uncompressed responses. + # TODO: add a functional test once the test client framework exists + self._session = _session or aiohttp.ClientSession( + auto_decompress=False, + headers={"Accept-Encoding": "identity"}, + ) async def send( self,