#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 Thomas Riccardi):
(sorry I did not receive a mail notification for comments, just for issue
status update...)
Replying to [comment:4 Tim Graham]:
> Can you explain the use case for encoding bytes this way?
Replying to [comment:5 Simon Charette]:
> Is there a reason you can't base64 encode your binary content instead?
It should be easy to turn it into bytes when necessary after that.
Indeed base64 seems better fitted (and is more efficient), but today our
API accept both raw bytes and base64. It seems allowed by the various
RFCs, and it works with django 1 and python 2 (with the addition of
`str.decode('iso-8859-1')`).
It breaks with python 3: we currently cannot upgrade to python 3 or django
2 without breaking our API.
--
Ticket URL: <https://code.djangoproject.com/ticket/29323#comment:7>
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.c3bdd6f4aaa951ae9508d2a4a0ec3cd9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.