瀏覽代碼

aiohttp context: A 204 no content response should not have content

Bastien Sevajol 6 年之前
父節點
當前提交
85e2efaa1f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hapic/ext/aiohttp/context.py

+ 2 - 1
hapic/ext/aiohttp/context.py 查看文件

109
     ) -> typing.Any:
109
     ) -> typing.Any:
110
         # A 204 no content response should not have content type header
110
         # A 204 no content response should not have content type header
111
         if http_code == HTTPStatus.NO_CONTENT:
111
         if http_code == HTTPStatus.NO_CONTENT:
112
-            mimetype = None,
112
+            mimetype = None
113
+            response = ''
113
 
114
 
114
         return Response(
115
         return Response(
115
             body=response,
116
             body=response,