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 rus_r_orange
Recipients
Date 2006-07-11.22:16:22
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2008-01-20 09:58:48adminlinkissue1520831 messages
2008-01-20 09:58:48admincreate