Senthil Kumaran <orsent...@gmail.com> added the comment: Hi Georg,
In the previous comment, I had written that 'let me see if we have to accommodate those "very special case" where data can be a zero length string just to accommodate the mistake it was present in the earlier version.' More, I think about it, the more it seems to me that accommodating that special wrong case is not required. The decision boils down to this. 1. In py3k, data for POST should be bytes. 2. But urllib.request had a 'bug/hole' that when a zero length string was passed as a data, it did not raise an exception. There were cases in test_urllib2 where zero length string was passed. I argue that it was more of a mistake than, what we actually wanted to test it. Because there is NO practical scenario where Zero length data as a POST is useful. 3. Now, with the introduction of this feature requested in this issue, this zero length string would raise an Exception and would demand that even if it is zero length, please send it as bytes. IMO, this is correct behavior and we need not accommodate the previous one. So, I would recommend closing this bug as Fixed without further change. At most, a NEWS item can be added to explain point 2. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com