Bugs item #1520831, was opened at 2006-07-11 15:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520831&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Feature Request Status: Open Resolution: None Priority: 5 Submitted By: rus_r_orange (rus_r_orange) Assigned to: Nobody/Anonymous (nobody) Summary: urrlib2 max_redirections=0 disables redirects Initial Comment: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520831&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com