File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ async def _create_session() -> aiohttp.ClientSession:
8787 self .websession = websession
8888
8989 self ._auth = aiohttp .BasicAuth (username , password = password )
90+ # Work-around for Stretchv2-aiohttp-deflate-error, can be removed for aiohttp v3.7
91+ self ._headers = {"Accept-Encoding" : "gzip" }
9092
9193 self ._timeout = timeout
9294 self ._endpoint = f"http://{ host } :{ str (port )} "
@@ -230,7 +232,10 @@ async def request(
230232 try :
231233 with async_timeout .timeout (self ._timeout ):
232234 if method == "get" :
233- resp = await self .websession .get (url , auth = self ._auth )
235+ # Work-around, see above, can be removed for aiohttp v3.7:
236+ resp = await self .websession .get (
237+ url , auth = self ._auth , headers = self ._headers
238+ )
234239 if method == "put" :
235240 resp = await self .websession .put (
236241 url , data = data , headers = headers , auth = self ._auth
You can’t perform that action at this time.
0 commit comments