On Fri, 1 Sep 2017, Sean McGinnis wrote:

Thanks Chris, I wasn't aware of that. What's your opinion - change
it to be more strict, or leave it as is?

Ideally we'd have true content negotiation and support multiple
representations with different content types and diferent versions.

;)/2

But since we don't I think existing services can probably forgo
making any changes unless they are eager to tighten things up.

For some additional context:

Placement vaguely supports content negotiation but not in any
significant way. The docstring of a check_accept decorator says:
"If accept is set explicitly, try to follow it. If there is no match
for the incoming accept header send a 406 response code.  If accept
is not set send our usual content-type in response."

Because of the way placement uses webob, and the way webob uses the
accept header to control the formatting of error responses then
content negotiation comes into play on error responses: They are
text/html unless there is an accept header of application/json.


--
Chris Dent                      (⊙_⊙')         https://anticdent.org/
freenode: cdent                                         tw: @anticdent
__________________________________________________________________________
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