mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
731443b71e
The `DefaultContentNegotiation` handler uses For example: Google Chrome sends an Accept-header of `Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`, when I request a *.png URL. After matching the media-types with the available renderers (in my case only a custom `PNGRenderer` with a `media_type='image/png'`), only `*/*;q=0.8` is left, which happens to have the same length as the "image/png" media-type defined by the renderer (9 characters). The specificity of the renderer's media-type over the Accept-header's one is only determined by length. Using your `_MediaType.precedence` would be preferable in my eyes. Regards, Fabian |
||
---|---|---|
.. | ||
authtoken | ||
runtests | ||
static/rest_framework | ||
templates/rest_framework | ||
templatetags | ||
tests | ||
utils | ||
__init__.py | ||
authentication.py | ||
compat.py | ||
decorators.py | ||
exceptions.py | ||
fields.py | ||
filters.py | ||
generics.py | ||
mixins.py | ||
models.py | ||
negotiation.py | ||
pagination.py | ||
parsers.py | ||
permissions.py | ||
renderers.py | ||
request.py | ||
response.py | ||
reverse.py | ||
serializers.py | ||
settings.py | ||
status.py | ||
throttling.py | ||
urlpatterns.py | ||
urls.py | ||
views.py |