Found urllib strangeness with redirects - is this really a problem?
Andrew Dalke
adalke at mindspring.com
Fri Feb 28 03:13:21 EST 2003
Akai Majo Sizer
> Note: RFC 1945 and RFC 2068 specify that the client is not allowed
> to change the method on the redirected request. However, most
> existing user agent implementations treat 302 as if it were a 303
> response, performing a GET on the Location field-value regardless
> of the original request method. The status codes 303 and 307 have
> been added for servers that wish to make unambiguously clear which
> kind of reaction is expected of the client.
>
> Is this even worth caring about? Maybe at least a comment in the code?
> Personally, my problem is solved, but it was a bear to figure out what
> was going on, so I thought I'd mention it.
Me? I prefer that it match the specification. Eg, suppose I'm using urllib
for something besides POST, like a HEAD or a DELETE or .... I don't
want that turned into a GET request. A browser can get away with it because
for most of its cases a POST and GET are the same.
So no code change, but if you want to make a note somewhere you
can submit a patch to sourceforge. I'm not sure about where to put that
comment.
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list