malformed JSON request body returns 500 error and stack trace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Alex Meade |
Bug Description
Sending malformed JSON body, for example
$ echo 'foo'|curl -v -H 'X-Auth-Token: token' -H 'Content-Type: application/json' -X POST -T - http://
causes JSON decoder exception and returns a stack trace.
[snip]
File "/opt/stack-
def _check_
File "/opt/stack-
raise webob.exc.
File "/opt/stack-
return {'body': self.from_
File "/opt/stack-
return json.loads(
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
It seems JSONRequestDese
Changed in glance: | |
status: | New → In Progress |
assignee: | nobody → Alex Meade (alex-meade) |
Changed in glance: | |
importance: | Undecided → Medium |
milestone: | none → folsom-rc1 |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | folsom-rc1 → 2012.2 |
Fix proposed to branch: master /review. openstack. org/11873
Review: https:/