POSTing to /servers with a content-type of text/plain
and a text/plain body results in a response code of 400.
It should be 415. I found this line in the code that
appears to handle this singular case and modified
the HTTP exception used to the correct one. Tests were
also updated accordingly.
Reviewed: https:/ /review. openstack. org/308823 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f6f0d1bae8b 67c2d8617f87dbc 453a60943883c3
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit f6f0d1bae8b67c2 d8617f87dbc453a 60943883c3
Author: Brandon Irizarry <email address hidden>
Date: Wed Apr 13 05:18:25 2016 +0000
Changed an HTTP exception to return proper code
POSTing to /servers with a content-type of text/plain
and a text/plain body results in a response code of 400.
It should be 415. I found this line in the code that
appears to handle this singular case and modified
the HTTP exception used to the correct one. Tests were
also updated accordingly.
Conflicts:
nova/ api/openstack/ wsgi.py
nova/ tests/unit/ api/openstack/ compute/ legacy_ v2/test_ servers. py
Change-Id: I5fa1fdba56803b 2ef63b1efaaeece d6ceb7779d9 9d825c6c6f22203 31e4ffb033)
Closes-Bug: 1567977
(cherry picked from commit a7019a87ba69650