aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/negotiation.py
AgeCommit message (Collapse)Author
2012-11-27Renderer negotiation: media_type specificty evaluation weakFabian Büchler
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
2012-10-29Fixes for urls with suffixesTom Christie
2012-10-17Negotiation API finalized. .select_renderers and .select_parsersTom Christie
2012-10-05Remove Parser.can_handle_request()Tom Christie
2012-10-05Accepted media type uses most specific of client/renderer media types.Tom Christie
2012-09-20Change package name: djangorestframework -> rest_frameworkTom Christie