[issue1673007] urllib2 requests history + HEAD support

Senthil Kumaran report at bugs.python.org
Tue Oct 11 12:02:08 CEST 2011


Senthil Kumaran <senthil at uthcode.com> added the comment:

Patrick, 

Lots of valid points. I had not looked at the RFC spec when I mentioned about data over request (GET) method, but was trying to derive the current functionality of module (so that users can have a seamless experience) with additional method="GET" as default.  Note, my intention was to be explicit when we give method arg.

But yeah, when user has specified the methods (PUT/DELETE etc) and given the data, correct rules should apply on how that method should deal with data.

As you pointed out to RFC, I realize RFC clearly points out the data (message-body) should be ignored and method should be given preference, whenever specification of method has nothing to with data.  I should take back my argument on giving data as preference even over GET.

Now, question arises- Can we in anyway default the method="GET" and maintain compatibility as well consistency with user expectations? At the moment, just by sending data over Request, the method is assumed to be POST. If that is not possible, then the way, current patch does seems to be a good way to acheive the purpose.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1673007>
_______________________________________


More information about the Python-bugs-list mailing list