placement api requires content-type on put and post even when no body
Bug #1674392 reported by
Chris Dent
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Chris Dent |
Bug Description
The placement API a guarding condition which checks the request method. If it is PUT, POST or PATCH the presence of a content-type header is required.
This is too strict (but happened to work fine for the api at the time). It is reasonable and okay to make a PUT or POST without a body, and thus without a content-type, and now we want to do such things within the placement API (with putting custom traits and resource classes).
The fix is to only raise the 400 when content-length is set and non-zero. In that case a missing content-type is a bug, irrespective of method.
Changed in nova: | |
assignee: | Chris Dent (cdent) → Alex Xu (xuhj) |
Changed in nova: | |
assignee: | Alex Xu (xuhj) → Chris Dent (cdent) |
Changed in nova: | |
assignee: | Chris Dent (cdent) → Alex Xu (xuhj) |
Changed in nova: | |
assignee: | Alex Xu (xuhj) → Chris Dent (cdent) |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/447625
Review: https:/