commit | e6f060903cf2080b6570a87fde5021aa14d05530 | [log] [tgz] |
---|---|---|
author | Martin Panter <vadmium+py@gmail.com> | Mon May 16 01:14:20 2016 +0000 |
committer | Martin Panter <vadmium+py@gmail.com> | Mon May 16 01:14:20 2016 +0000 |
tree | 7aa104e7862ff4cb1f61baf74bf09d78f11094db | |
parent | ce6e06874b235f7825888c20fd2c6f4670a4aeba [diff] |
Issue #17214: Percent-encode non-ASCII bytes in redirect targets Some servers send Location header fields with non-ASCII bytes, but "http. client" requires the request target to be ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch by Christian Heimes. Python 2 does not suffer any problem because it allows non-ASCII bytes in the HTTP request target.