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,7 +109,8 @@ class AiohttpContext(BaseContext):
109 109
     ) -> typing.Any:
110 110
         # A 204 no content response should not have content type header
111 111
         if http_code == HTTPStatus.NO_CONTENT:
112
-            mimetype = None,
112
+            mimetype = None
113
+            response = ''
113 114
 
114 115
         return Response(
115 116
             body=response,