We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When 'PATH_INFO': '/\xff', we get this
Traceback (most recent call last): File "/home/staff/ve/lib/python2.7/site-packages/pyramid_exclog-0.6-py2.7.egg/pyramid_exclog/init.py", line 44, in exclog_tween return handler(request) File "/home/staff/ve/lib/python2.7/site-packages/pyramid_tm-0.3-py2.7.egg/pyramid_tm/init.py", line 61, in tm_tween response = handler(request) File "/home/staff/ve/lib/python2.7/site-packages/pyramid-1.3-py2.7.egg/pyramid/router.py", line 79, in handle_request info = routes_mapper(request) File "/home/staff/ve/lib/python2.7/site-packages/pyramid-1.3-py2.7.egg/pyramid/urldispatch.py", line 79, in call raise URLDecodeError(e.encoding, e.object, e.start, e.end, e.reason) URLDecodeError: 'utf8' codec can't decode byte 0xff in position 16: invalid start byte
The text was updated successfully, but these errors were encountered:
Right. Not a bug. \xff alone is not a valid utf-8 codepoint. Pyramid assumes the URI is encoded in UTF-8. It'd be the same as trying to do:
>>> '\xff'.decode('utf-8') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte
Either send URLs to Pyramid that are valid UTF-8, or use WebOb's Request.decode(thecharset) method in a request factory to turn it in to UTF-8.
Sorry, something went wrong.
No branches or pull requests
When 'PATH_INFO': '/\xff', we get this
Traceback (most recent call last):
File "/home/staff/ve/lib/python2.7/site-packages/pyramid_exclog-0.6-py2.7.egg/pyramid_exclog/init.py", line 44, in exclog_tween
return handler(request)
File "/home/staff/ve/lib/python2.7/site-packages/pyramid_tm-0.3-py2.7.egg/pyramid_tm/init.py", line 61, in tm_tween
response = handler(request)
File "/home/staff/ve/lib/python2.7/site-packages/pyramid-1.3-py2.7.egg/pyramid/router.py", line 79, in handle_request
info = routes_mapper(request)
File "/home/staff/ve/lib/python2.7/site-packages/pyramid-1.3-py2.7.egg/pyramid/urldispatch.py", line 79, in call
raise URLDecodeError(e.encoding, e.object, e.start, e.end, e.reason)
URLDecodeError: 'utf8' codec can't decode byte 0xff in position 16: invalid start byte
The text was updated successfully, but these errors were encountered: