OSAPI: POST to servers metadata does not respect Accept header

Bug #795045 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 to set new metadata on a specific server, the response content-type is text/html and the body is actually json-encoded. I would expect to get a properly-formatted xml response. This is not a problem on a GET to the same url with an xml accept header.

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/servers/3/meta

< HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
< Content-Length: 26
< Date: Thu, 09 Jun 2011 13:43:42 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"metadata":{"pew":"pew"}}

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.