Message10552
urllib2 (I'm using 1.13.22 with Python 2.0, but I assume the 2.2 branch does the same) uses the
POST method on redirect, contrary to RFC1945 section 9.3:
> 9.3 Redirection 3xx
>
> This class of status code indicates that further action needs to be
> taken by the user agent in order to fulfill the request. The action
> required may be carried out by the user agent without interaction
> with the user if and only if the method used in the subsequent
> request is GET or HEAD. A user agent should never automatically
> redirect a request more than 5 times, since such redirections usually
> indicate an infinite loop.
Can be fixed in HTTPRedirectHandler.http_error_302 by replacing
new = Request(newurl, req.get_data())
with
new = Request(newurl)
so that GET is done on redirect instead of POST.
I suppose the limit of 10 in the same function should be changed to 5, also.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:00:59 | admin | link | issue549151 messages |
2007-08-23 14:00:59 | admin | create | |
|