Issue1520831
Created on 2006-07-11 22:16 by rus_r_orange, last changed 2009-02-13 02:08 by ajaksu2.
|
msg60939 - (view) |
Author: rus_r_orange (rus_r_orange) |
Date: 2006-07-11 22:16 |
|
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.
|
|
msg81785 - (view) |
Author: Daniel Diniz (ajaksu2) |
Date: 2009-02-12 17:39 |
|
rus_r_orange: Can you share your patch and tests?
|
|
| Date |
User |
Action |
Args |
| 2009-02-13 02:08:47 | ajaksu2 | set | nosy:
+ jjlee |
| 2009-02-12 17:39:44 | ajaksu2 | set | nosy:
+ ajaksu2, orsenthil stage: test needed messages:
+ msg81785 versions:
+ Python 2.7 |
| 2006-07-11 22:16:22 | rus_r_orange | create | |
|