You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running my Django app with bjoern and navigating to an URL with characters outside of ISO-8859-1 charset it fails with error:
Traceback (most recent call last):
File "/webapps/django-interfax-app/env/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 145, in __call__
request = self.request_class(environ)
File "/webapps/django-interfax-app/env/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 69, in __init__
path_info = get_path_info(environ)
File "/webapps/django-interfax-app/env/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 162, in get_path_info
path_info = get_bytes_from_wsgi(environ, 'PATH_INFO', '/')
File "/webapps/django-interfax-app/env/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 210, in get_bytes_from_wsgi
return value.encode('iso-8859-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\u0457' in position 1: ordinal not in range(256)
Probably the root cause
On Python platforms where the str or StringType type is in fact Unicode-based (e.g. Jython, IronPython, Python 3, etc.), all "strings" referred to in this specification must contain only code points representable in ISO-8859-1 encoding (\u0000 through \u00FF, inclusive). [1]
Problem
When running my Django app with bjoern and navigating to an URL with characters outside of ISO-8859-1 charset it fails with error:
Probably the root cause
[1] https://www.python.org/dev/peps/pep-3333/#unicode-issues
Expected
As it's implemented in
wsgiref
.curl localhost:8080/%C3%A5
printsPATH_INFO: /Ã¥
.Actual
curl localhost:8080/%C3%A5
printsPATH_INFO: /å
.The text was updated successfully, but these errors were encountered: