From f37018733295a09fa2ff521b99dccc6bccc91540 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 14 Mar 2016 18:03:54 -0500 Subject: [PATCH] removed double json.loads(body), thanks Simone --- gluon/globals.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gluon/globals.py b/gluon/globals.py index 4f9ff811..d859eb30 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -375,12 +375,7 @@ class Request(Storage): and callable(rest_action)): raise HTTP(405, "method not allowed") try: - vars = request.vars - if method == 'POST' and is_json: - body = request.body.read() - if len(body): - vars = sj.loads(body) - res = rest_action(*request.args, **vars) + res = rest_action(*request.args, **request.vars) if is_json and not isinstance(res, str): res = json(res) return res