-
Notifications
You must be signed in to change notification settings - Fork 757
fix: add support for non-latin1 characters in wsgi module #3648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Puzzled by this, if it is wsgiref raising non-latin1 chars if django allows them maybe we should use something else instead of wsgiref in the first place? Have you looked at what django is doing? PEP-3333 also seems to support what we are doing https://peps.python.org/pep-3333/#unicode-issues |
@xrmx If I'm reading this all correctly it looks like django has a lot of string handling under the hood to handle this sort of thing https://github.com/django/django/blob/77d455ae73b177a32102f0b248828b5d63c0aa24/django/http/request.py#L215 |
@tnoff I think the interesting bits are here https://github.com/django/django/blob/77d455ae73b177a32102f0b248828b5d63c0aa24/django/core/handlers/wsgi.py#L147 |
@xrmx yeah I updated yesterday with some bits pretty close to the |
@xrmx sorry for ping but did you get a chance to check out the revisions I made? |
No, sorry |
Description
If a non latin1 character is passed as a URL, you can see the following error
The latin1 bit seems to be hardcoded in the underlying library
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added unit test
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.