salt/tests/unit/netapi
FELD Boris 5e9c3c7d96 Improve support of Accept header in saltnado.
It currently supports 'simple' values like application/json, but Accept header
could also include more than one value with parameters
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1.
For example:

```application/json, text/javascript, */*; q=0.01```

This PR add support for multiple media_range in Accept header, support parsing
of parameter (like q=0.01) but discard them and finally iterate on
media_range and take the first compatible.

A more complete implementation may fully supports the RFC and support
q parameter and specific order of priority to find the most compatible
Content-Type but I don't think it's worth the pain.

If we want a better implementation, werkzeug has actually an implementation
http://werkzeug.pocoo.org/docs/0.10/datastructures/#werkzeug.datastructures.Accept.best_match.
2015-09-17 00:48:34 +02:00
..
rest_cherrypy Rename the rest_cherrypy tests to conform to our convention 2015-09-09 10:39:34 -06:00
rest_tornado Improve support of Accept header in saltnado. 2015-09-17 00:48:34 +02:00
__init__.py Don't forget the blank lines at the end of the file 2015-04-24 16:29:51 -06:00