Skip to content

Commit 31c2818

Browse files
authored
smithy-http: Disable auto-decompression in aiohttp client (#708)
1 parent e535606 commit 31c2818

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "bugfix",
3+
"description": "Disabled automatic response decompression in `AIOHTTPClient`."
4+
}

packages/smithy-http/src/smithy_http/aio/aiohttp.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ def __init__(
6565
"""
6666
_assert_aiohttp()
6767
self._config = client_config or AIOHTTPClientConfig()
68-
self._session = _session or aiohttp.ClientSession()
68+
# Disable transparent response decompression and advertise
69+
# 'identity' to request uncompressed responses.
70+
# TODO: add a functional test once the test client framework exists
71+
self._session = _session or aiohttp.ClientSession(
72+
auto_decompress=False,
73+
headers={"Accept-Encoding": "identity"},
74+
)
6975

7076
async def send(
7177
self,

0 commit comments

Comments
 (0)