#5738: django fails on defective unicode strings appearing in the url
-----------------------------------------------------+----------------------
Reporter: Soeren Sonnenburg <[EMAIL PROTECTED]> | Owner:
nobody
Status: reopened | Component:
HTTP handling
Version: SVN | Resolution:
Keywords: | Stage:
Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 1
-----------------------------------------------------+----------------------
Comment (by mtredinnick):
Thinking about this a lot more, I'm not totally happy with the fix in
[6475], but it's a line-ball a bit. The problem is that although UTF-8 is
''strongly recommended'' as the encoding for non-ASCII data, it's not
actually codified in any spec until quite recently (RFC 2396 leaves things
wide open, for example). Only in RFC 3986 were things made clear for IRI
to URI encoding.
In the interim, systems were deployed that spit out non-UTF-8 encoded
URIs.
So I'm going to commit a change that passes back a 400 response for
malformed input (non-UTF-8) but also makes it easier to override the
request class, so if somebody is dealing with a legacy system, they can
subclass WSGIRequestor or !ModPythonRequest to handle decoding the URI
however they need to.
--
Ticket URL: <http://code.djangoproject.com/ticket/5738#comment:10>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---