#29323: HTTPRequest QueryDict wrongly decodes binary encoded values
---------------------------------+--------------------------------------
     Reporter:  Thomas Riccardi  |                    Owner:  nobody
         Type:  Bug              |                   Status:  closed
    Component:  HTTP handling    |                  Version:  1.11
     Severity:  Normal           |               Resolution:  wontfix
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Tim Graham):

 Could you cite your source? [https://www.w3.org/TR/2003/REC-
 xforms-20031014/slice11.html#serialize-urlencode I found]:

  [`application/x-www-form-urlencoded`] is not suitable for the persistence
 of binary content. Therefore, it is recommended that forms capable of
 containing binary content use another serialization method.

 [https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST and]:

  application/x-www-form-urlencoded: the values are encoded in key-value
 tuples separated by '&', with a '=' between the key and the value. Non-
 alphanumeric characters are percent encoded: this is the reason why this
 type is not suitable to use with binary data (use multipart/form-data
 instead)

 Maybe a custom middleware could allow your use case.

 If you have a fix to offer, we could evaluate it.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29323#comment:8>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.516af8d7965cc56a3ee1cb3202b1b964%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to