From 47ec026536fb40818237afaecb543f3a09e4c087 Mon Sep 17 00:00:00 2001 From: Channel Cat Date: Sun, 23 Oct 2016 03:30:13 -0700 Subject: [PATCH] Fix incomplete request body being read --- sanic/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sanic/server.py b/sanic/server.py index 93e3322a..baacc10b 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -110,7 +110,10 @@ class HttpProtocol(asyncio.Protocol): ) def on_body(self, body): - self.request.body = body + if self.request.body: + self.request.body += body + else: + self.request.body = body def on_message_complete(self): self.loop.create_task(