Procházet zdrojové kódy

Disable aiohttp's Content-Type checking on JSON parsing by default

master
JustAnotherArchivist před 3 roky
rodič
revize
005999fcb9
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. +5
    -0
      qwarc/aiohttp.py

+ 5
- 0
qwarc/aiohttp.py Zobrazit soubor

@@ -175,6 +175,11 @@ class ClientResponse(aiohttp.client_reqrep.ClientResponse):
self._content = await self._read()
return self._content

async def json(self, **kwargs):
if 'content_type' not in kwargs:
kwargs['content_type'] = None
return (await super().json(**kwargs))

async def release(self):
if not self.closed:
self.connection.reset_raw_data()


Načítá se…
Zrušit
Uložit