From 85acddddbaddd4231eeba3de0f575a3d251fb996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Sampedro?= Date: Tue, 25 Apr 2017 12:00:27 +0200 Subject: [PATCH] invariant: body after request is processed must be binary --- sanic/server.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sanic/server.py b/sanic/server.py index 33763bbb..d10a75cf 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -173,8 +173,7 @@ class HttpProtocol(asyncio.Protocol): self.request.body.append(body) def on_message_complete(self): - if self.request.body: - self.request.body = b''.join(self.request.body) + self.request.body = b''.join(self.request.body) self._request_handler_task = self.loop.create_task( self.request_handler(