mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
5e9c3c7d96
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. |
||
---|---|---|
.. | ||
beacons | ||
cli | ||
cloud | ||
config | ||
modules | ||
netapi | ||
output | ||
pillar | ||
renderers | ||
returners | ||
serializers | ||
states | ||
templates | ||
transport | ||
utils | ||
__init__.py | ||
auth_test.py | ||
client_test.py | ||
crypt_test.py | ||
files_test.py | ||
highstateconf_test.py | ||
log_test.py | ||
minion_test.py | ||
payload_test.py | ||
pillar_test.py | ||
pydsl_test.py | ||
pyobjects_test.py | ||
simple.py | ||
spm_test.py | ||
stateconf_test.py | ||
template_test.py | ||
version_test.py |