Code review comment for lp:~johannes.erdfelt/nova/lp844910

Revision history for this message
Jay Pipes (jaypipes) wrote :

> True, but the code would be relatively complicated. Much of the code in
> nova/api/openstack/wsgi.py deals with determining the best match for the
> accept header. This isn't trivial since content types can be weighted.
>
> To handle the case of "application/vnd.openstack.compute+xml; q=0.2,
> application/xml; q=0.8" would require some fairly sophisticated code to parse
> out the accept, choose the best match, possibly replace/remove it from the
> accept header and then possibly replace the content-type on the response path.

Sophisticated code that's actually already written :)

http://docs.webob.org/en/latest/reference.html#accept-headers

-jay

« Back to merge proposal