Message60939
When using urllib2, I wanted to be able to see all
redirects that come back from an http server. I set the
variable max_redirections in HTTPRedirectHandler to 0.
However, redirects were still being followed because
the req didn't have a redirect_dict set.
IMHO, if max_redirections is set to 0, redirects should
not be followed, no matter what.
For my personal situation, I copied urllib2 and hacked
it to that if max_redirections is 0 (or less), it will
always raise the HTTPError that is associated with the
status code received by the request.
I saw this issue on WinXP with 2.4.1 and on Linux with
2.4.3.
|
|
Date |
User |
Action |
Args |
2008-01-20 09:58:48 | admin | link | issue1520831 messages |
2008-01-20 09:58:48 | admin | create | |
|