Quoting Chris Angelico <rosuav at gmail.com>: > I'm pretty sure that server is in violation of the spec, so all bets > are off as to what any other server will do. If you know you're > dealing with this one server, you can probably hack around this, but I > don't think it belongs in core code. Unless, of course, I'm completely > wrong about the spec, or if there's a de facto spec that lots of > servers follow, in which case maybe it would be worth doing. It would be possible to support this better by using "ascii" with "surrogateescape" when receiving the redirect, and using the same for all URLs coming into http.client. This would implement a best-effort strategy at preserving the bogus URL, and still maintain the notion that URLs are text (with the other path being to also allow bytes as URLs, and always parsing Location as bytes). Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4