Hi Devs,

As of now, when user passes 'Accept' header in request other than JSON and XML 
using curl command then it returns 200 OK response with json format data.
In api-ref guide [1] also it's not clearly mentioned about what response it 
should return if invalid value for 'Accept' header is specified. IMO instead of 
'HTTP 200 OK' it should return 'HTTP 406 Not Acceptable' response.

I have checked this behavior for nova, cinder and glance and for all of these 
it is returning HTTP 200 OK which is invalid.
Please let me know your opinion for the same.

Steps to reproduce:

Request:
curl -g -i -X GET 
http://controller/volume/v2/c72e66cc4f1341f381e0c2eb7b28b443/volumes/detail -H 
"User-Agent: python-cinderclient" -H "Accept: application/abc" -H 
"X-Auth-Token: cd85aff745ce4dc0a04f686b52cf7e4f"


Response:
HTTP/1.1 200 OK
Date: Thu, 31 Aug 2017 07:12:18 GMT
Server: Apache/2.4.18 (Ubuntu)
x-compute-request-id: req-ab48db9d-f869-4eb4-95f9-ef8e90a918df
Content-Type: application/json
Content-Length: 2681
x-openstack-request-id: req-ab48db9d-f869-4eb4-95f9-ef8e90a918df
Connection: close

[1] 
https://developer.openstack.org/api-ref/block-storage/v2/#list-volumes-with-details


Thank you,
Niraj Singh


______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to