OSAPI fault responses returning invalid content-type/body

Bug #745043 reported by Brian Waldon
14
This bug affects 2 people
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-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: 172.19.0.3:8774
> X-Auth-Token: 318e1b17bb0577faa312e4224281c7a0b03ddf4e
> 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-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: 172.19.0.3:8774
> X-Auth-Token: 318e1b17bb0577faa312e4224281c7a0b03ddf4e
> 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

Brian Waldon (bcwaldon)
Changed in nova:
assignee: nobody → Brian Waldon (bcwaldon)
Brian Waldon (bcwaldon)
Changed in nova:
status: New → In Progress
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.