Anthony Sottile added the comment:

A few typos in my previous comment, pressed enter too quickly, here's an 
updated comment:

Patch attached with test.

In summary:

A request to the url b'/\x80' appears to the application as a request to 
b'/\xc2\x80' -- The issue being the latin1 decoded PATH_INFO is re-encoded as 
UTF-8 and then decoded as latin1

    (on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode utf-8)-> 
b'\xc2\x80' -(decode latin1)-> u'\xc2\x80'

My patch cuts out the encode(utf-8)->decode(latin1):

    (on the wire) b'\x80' -(decode latin1) -> u'\x80'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26717>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to