misc: don't load json input if there's no input stream (#40481)
This commit is contained in:
parent
d763b18b60
commit
9ec92726b6
|
@ -132,7 +132,7 @@ class HTTPRequest(quixote.http_request.HTTPRequest):
|
|||
if length and ctype not in ('application/x-www-form-urlencoded', 'multipart/form-data'):
|
||||
self.stdin = self.django_request
|
||||
quixote.http_request.HTTPRequest.process_inputs(self)
|
||||
if ctype == 'application/json':
|
||||
if ctype == 'application/json' and self.stdin:
|
||||
from .misc import json_loads
|
||||
length = int(self.environ.get('CONTENT_LENGTH') or '0')
|
||||
self.stdin.seek(0) # quixote will have consumed the body
|
||||
|
|
Loading…
Reference in New Issue