FAQ

Quoting Chris Angelico <rosuav@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

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
grouppython-dev @
categoriespython
postedJan 4, '14 at 3:36p
activeJan 4, '14 at 8:43p
posts4
users4
websitepython.org

People

Translate

site design / logo © 2017 Grokbase