From 4f74133db5595b556b84e173a2e754f469eeb2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 4 Jul 2013 18:27:02 -0300 Subject: Check if request content is None before doing anything --- src/leap/util/request_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leap/util/request_helpers.py b/src/leap/util/request_helpers.py index e06dabb8..350abfbd 100644 --- a/src/leap/util/request_helpers.py +++ b/src/leap/util/request_helpers.py @@ -41,7 +41,7 @@ def get_content(request): contents = "" mtime = None - if request.json: + if request.content and request.json: if callable(request.json): contents = json.dumps(request.json()) else: -- cgit v1.2.3