Message10563
Logged In: YES
user_id=261020
Here is a patch for the minor documentation changes required
for the patch I uploaded earlier to fix this bug. I've also
uploaded a slightly revised patch:
I renamed the `method' method to `get_method' for
consistency with the other methods of the Request class.
The reason this new method is there at all is because the
logic that decides whether or not a redirection should take
place is defined in terms of the method type
(GET/HEAD/POST). urllib2 doesn't support HEAD ATM, but it
might in future. OTOH, the Request class is supposed to be
generic -- not specific to HTTP -- so perhaps get_method
isn't really appropriate. OTOOH, add_data is already
documented to only be meaningful for HTTP Requests. I
suppose there could be a subclass HTTPRequest, but that's
less simple. What do you think is best?
I also changed redirect_request to raise an exception
instead of returning None (because no other Handler should
handle the redirect), and changed its documented return
value / exception interface to be consistent with the rest
of urllib2.
John
|
|
Date |
User |
Action |
Args |
2007-08-23 14:00:59 | admin | link | issue549151 messages |
2007-08-23 14:00:59 | admin | create | |
|