[openstack-dev] [nova][cinder][glance] What should be the response for invalid 'Accpet' header?
sean.mcginnis at gmx.com
Fri Sep 1 16:06:38 UTC 2017
> However, this isn't violating the HTTP 1.1 RFCs.
> https://tools.ietf.org/html/rfc7231#section-5.3.2 says:
> "If the header field is present in a request and none of the
> available representations for the response have a media type that is
> listed as acceptable, the origin server can either honor the header
> field by sending a 406 (Not Acceptable) response or disregard the
> header field by treating the response as if it is not subject to
> content negotiation."
> As far as I'm aware very very few (if any) openstack services do
> content negotiation. They only return JSON. Given that, it is
> acceptable (ha!) for the header to be disregarded if that's what
> people choose.
Thanks Chris, I wasn't aware of that. What's your opinion - change
it to be more strict, or leave it as is?
More information about the OpenStack-dev