]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Include proper Content-Type in the HTTP response headers
authorsridhargaddam <sridhar.gaddam@enovance.com>
Mon, 24 Feb 2014 15:21:31 +0000 (20:51 +0530)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:32 +0000 (15:20 +0800)
commit2b201c4500c5029305c7db4d6188f04b00a64974
treebd8eb37dd761da25b051d95d5dbfbbbc1d2dac50
parent8141fcaa17117d9f4b63bb9f81f7437e695654af
Include proper Content-Type in the HTTP response headers

Neutron namespace proxy handler and metadata agent were not setting the
Content-Type in its response. Both of them were returning only the response
data which is obtained from the nova-metadata-service. Since they were returning
only the response data, the Content-Type returned to the clients has the default
one which is - "text/html". Ideally this should be set to the data type which is
present in the HTTP Response. The fix now includes the Content-Type which is
returned by nova-metadata-service

Closes-Bug: #1243878
Change-Id: If68f0b508fbea4ecd1eb0e58d602b5ba6ccbe263
neutron/agent/metadata/agent.py
neutron/agent/metadata/namespace_proxy.py
neutron/tests/unit/test_metadata_agent.py
neutron/tests/unit/test_metadata_namespace_proxy.py