#20557: Mangled Cookies on Python 3 -------------------------------+-------------------- Reporter: mitsuhiko | Owner: nobody Type: Uncategorized | Status: new Component: HTTP handling | Version: 1.5 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- The WSGI spec mangles the strings when they go into the environment. This not only affects QUERY_STRING, PATH_INFO and SCRIPT_NAME, it also affects headers that are not latin1. This for instance applies to the HTTP_COOKIE header. When you set a cookie named ``förmlich="nährhaft"`` with JavaScript, Django will give you a mangled value.
The correct solution on Python 3 is to encode it back to latin1 and decode it from utf-8 as browsers do. -- Ticket URL: <https://code.djangoproject.com/ticket/20557> 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 post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.38e811dfcbcca844bd8d5a3ee53fb009%40djangoproject.com?hl=en. For more options, visit https://groups.google.com/groups/opt_out.