#36411: get_preferred_type ignores params
----------------------------+-----------------------------------------
     Reporter:  magicfelix  |                     Type:  Bug
       Status:  new         |                Component:  HTTP handling
      Version:  5.2         |                 Severity:  Normal
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+-----------------------------------------
 I use the following code to get the preferred content type:

 {{{#!python
 media_types = ["text/vcard; version=4.0", "text/vcard; version=3.0",
 "text/vcard", "text/directory"]
 print("Preferred type:", request.get_preferred_type(media_types))
 }}}

 A request using the following header …
 `Accept: text/vcard; version=3.0`
 … produces the following result
 `Preferred type: text/vcard; version=4.0`

 It should instead return `text/vcard; version=3.0`, as `4.0` was not
 included in the Accept header.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36411>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070196fcadf449-7e595865-74b7-400d-bc53-3ec480fe56ad-000000%40eu-central-1.amazonses.com.

Reply via email to