← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1572967] Re: Liberty: POST with Content_Type: text/plain results to 400

 

** Changed in: nova/liberty
       Status: In Progress => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1572967

Title:
  Liberty: POST with Content_Type:  text/plain results to 400

Status in OpenStack Compute (nova):
  Invalid
Status in OpenStack Compute (nova) liberty series:
  Won't Fix

Bug description:
  with below patch POST request with Content_Type: text/plain results to
  success:

  -  I2b5b08f164e0d45c55d5e2685b3e2a8641843fba
  In that cleanup, deserializer were cleaned up which used to block the POST request with Content_Type: text/plain and return 400. and results to make that success.  But stable branch before Mitaka returns the same error 400.

  This should be backported to have consistent behavior.

  Master/Mitaka-

  openstack@openstack-VirtualBox:~/devstack$ curl -g -i -X POST http://192.168.11.122:8774/v2.1/498175dbe9184abcbc003da2d248250b/servers -H "User-Agent: python-novaclient" -H "Content-Type: text/plain" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.25" -H "X-Auth-Token: b29d4fe2f7b44ad0bd451e13bd31f585" -d '{"server": {"min_count": 1, "flavorRef": "42", "name": "test", "imageRef": "b8f25318-3fa3-4b1a-8e41-c224dace04cc", "max_count": 1}}'
  HTTP/1.1 202 Accepted
  Content-Length: 446
  Location: http://192.168.11.122:8774/v2.1/498175dbe9184abcbc003da2d248250b/servers/fcd6eb18-d247-4a09-87b2-0aa5f4140810
  Content-Type: application/json
  X-Openstack-Nova-Api-Version: 2.25
  Vary: X-OpenStack-Nova-API-Version
  X-Compute-Request-Id: req-860d65ff-f6cf-4522-9e2a-ff046b59ac88
  Date: Thu, 21 Apr 2016 10:55:14 GMT


  Liberty-

  curl -g -i -X POST http://192.168.11.122:8774/v2.1/498175dbe9184abcbc003da2d248250b/servers -H "User-Agent: python-novaclient" -H "Content-Type: text/plain" -H "Accept: application/json"  -H "X-Auth-Token: b29d4fe2f7b44ad0bd451e13bd31f585" -d '{"server": {"min_count": 1, "flavorRef": "42", "name": "test", "imageRef": "b8f25318-3fa3-4b1a-8e41-c224dace04cc", "max_count": 1}}'
  HTTP/1.1 400 Bad Request
  X-Openstack-Nova-Api-Version: 2.1
  Vary: X-OpenStack-Nova-API-Version
  Content-Length: 68
  Content-Type: application/json; charset=UTF-8
  X-Compute-Request-Id: req-ff32a873-10bd-49ce-810d-b87c2c34de61
  Date: Thu, 21 Apr 2016 11:06:35 GMT

  {"badRequest": {"message": "Unsupported Content-Type", "code":
  400}}openstack@openstack-VirtualBox:~/devstack

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1572967/+subscriptions


References