OSAPI: 500 on POST images metadata when content-type/accept differ

Bug #795040 reported by Brian Waldon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
William Wolf

Bug Description

If I do a curl request where the Content-Type header is json and Accept header is xml, an attempt to set a new image metadata key results in a 500 error. The metadata is set on the backend and subsequent requests succeed. There should be no 500 error.

curl -X POST -H "Content-Type: application/json" -d '{"metadata":{"pew":"pew"}}' -v -H "Accept: application/xml" -H "X-Auth-Token: ${NOVA_TOKEN}" http://localhost:8774/v1.1/images/3/meta

< HTTP/1.1 500 Internal Server Error
< Content-Length: 222
< Content-Type: application/xml; charset=UTF-8
< Date: Thu, 09 Jun 2011 13:35:06 GMT
<
<cloudServersFault code="500" xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
    <message>
        You cannot set Response.body to a unicode object (use Response.unicode_body)
    </message>
</cloudServersFault>

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Changed in nova:
assignee: nobody → William Wolf (throughnothing)
Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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