fix request.json, close #1337

This commit is contained in:
ilvalle
2016-06-13 18:00:14 +02:00
parent a18e0e489f
commit 180ada57da
2 changed files with 3 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ _HISTORY_KIND = '_Shell_History'
UNPICKLABLE_TYPES = [
types.ModuleType,
type,
ClassType
ClassType,
types.FunctionType,
]

View File

@@ -40,7 +40,7 @@ import threading
import cgi
import copy
import tempfile
import json
import json as json_parser
FMT = '%a, %d-%b-%Y %H:%M:%S PST'
@@ -215,7 +215,7 @@ class Request(Storage):
if is_json:
try:
json_vars = json.load(body)
json_vars = json_parser.load(body)
except:
# incoherent request bodies can still be parsed "ad-hoc"
json_vars = {}