浏览代码

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

master
JustAnotherArchivist 3 年前
父节点
当前提交
005999fcb9
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      qwarc/aiohttp.py

+ 5
- 0
qwarc/aiohttp.py 查看文件

@@ -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()


正在加载...
取消
保存