Glance is behaving within acceptable parameters of RFC 7231 ("HTTP/1.1
Semantics and Content") on this [0].If we suddenly begin enforcing this, we're likely to break currently working clients who specify "Accept: aplication/json". On one hand, it's their fault for having a typo, but on the other hand, it's not clear to me what we gain by enforcing the 406. I think we want to err on the side of backward compatibility. [0] https://tools.ietf.org/html/rfc7231#section-5.3.2 (see the fifth paragraph counting backwards from the end of the section) ** Changed in: glance Status: New => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1714416 Title: Incorrect response returned for invalid Accept header Status in Cinder: Won't Fix Status in Glance: Invalid Status in OpenStack Heat: New Status in OpenStack Identity (keystone): New Status in masakari: Won't Fix Status in neutron: New Status in OpenStack Compute (nova): Won't Fix Bug description: 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. 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 To manage notifications about this bug go to: https://bugs.launchpad.net/cinder/+bug/1714416/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

