> 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 :)
> True, but the code would be relatively complicated. Much of the code in openstack/ wsgi.py deals with determining the best match for the vnd.openstack. compute+ xml; q=0.2,
> nova/api/
> accept header. This isn't trivial since content types can be weighted.
>
> To handle the case of "application/
> 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