This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile
Date 2016-04-08.20:53:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460148809.43.0.859393198242.issue26717@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2016-04-08 20:53:29Anthony Sottilesetrecipients: + Anthony Sottile
2016-04-08 20:53:29Anthony Sottilesetmessageid: <1460148809.43.0.859393198242.issue26717@psf.upfronthosting.co.za>
2016-04-08 20:53:29Anthony Sottilelinkissue26717 messages
2016-04-08 20:53:29Anthony Sottilecreate