[issue1401] urllib2 302 POST

Senthil report at bugs.python.org
Fri Nov 9 16:02:11 CET 2007


Senthil added the comment:

Hello Andres,
I think we are mixing up 2 or 3 things. Here are my comments.

1) urllib2 POST issue.
- Discussion broke on this. No conclusion.

2) GET Request.

>> If we create a GET request (handling 302 as 303) we should
>> remove the content length header!

I fail to find a reference for this statement in the RFC.

Currently urllib2, gets the headers from the original request and passes
the same headers to the redirected url. RFC mentions that we "should not
change the headers". I quoted the section previously.

3) Handling 30* headers the same way.
Yes, urllib2 handles them in the way stating most of the clients
apparently handle it the same way. Most of us are okay with it.
("Practicality beats Purity"). But when we find that something can be
improved, we just to add/extend the same. I am working on urilib
(sandbox/trunk/urilib) which has some extensions like cached redirection
for temporary redirections etc.

And for this issue, we just have to find the supporting evidence for:

>> If we create a GET request (handling 302 as 303) we should
>> remove the content length header!

If we don't find it,then it is not a bug.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1401>
__________________________________


More information about the Python-bugs-list mailing list