OSAPI fault responses returning invalid content-type/body
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Brian Waldon |
Bug Description
The following response should be formatted as application/xml, not text/html. This is just an example of what I have found in many places across the code when a generic error is thrown.
> GET /v1.0/flavors/6 HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-
> Host: 172.19.0.3:8774
> X-Auth-Token: 318e1b17bb0577f
> Accept: application/xml
>
< HTTP/1.1 404 Not Found
< Content-Type: text/html; charset=UTF-8
< Content-Length: 52
< Date: Tue, 29 Mar 2011 15:36:55 GMT
<
404 Not Found
The resource could not be found.
I have also seen responses like this, where the body is formatted correctly, but the Content-Type is just wrong:
> GET /v1.0/images/2 HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-
> Host: 172.19.0.3:8774
> X-Auth-Token: 318e1b17bb0577f
> Accept: application/xml
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/html; charset=UTF-8
< Content-Length: 113
< Date: Tue, 29 Mar 2011 15:38:58 GMT
<
<computeFault code="500">
<message>
unconverted data remains: .874850
</message>
</computeFault>
Related branches
- Devin Carlen (community): Approve
- Jay Pipes (community): Approve
- Titan: Pending requested
-
Diff: 163 lines (+106/-23)2 files modifiednova/api/openstack/faults.py (+1/-0)
nova/tests/api/openstack/test_faults.py (+105/-23)
Changed in nova: | |
assignee: | nobody → Brian Waldon (bcwaldon) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |