From 3cd3b2d9b7c463b8490d9409674fc4fb63b347a9 Mon Sep 17 00:00:00 2001 From: imbolc Date: Thu, 3 Nov 2016 12:34:55 +0700 Subject: [PATCH] Fix upload without content-type --- sanic/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/request.py b/sanic/request.py index 2687d86b..c2ab7260 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -71,7 +71,7 @@ class Request: self.parsed_form = {} self.parsed_files = {} content_type, parameters = parse_header( - self.headers.get('Content-Type')) + self.headers.get('Content-Type', '')) try: is_url_encoded = ( content_type == 'application/x-www-form-urlencoded')