Browse Source

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

Bastien Sevajol 6 years ago
parent
commit
85e2efaa1f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      hapic/ext/aiohttp/context.py

+ 2 - 1
hapic/ext/aiohttp/context.py View File

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,