Просмотр исходного кода

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

Bastien Sevajol 7 лет назад
Родитель
Сommit
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,