This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients catlee, davide.rizzo, eric.araujo, georg.brandl, jhylton, orsenthil, pitrou, rcoyner, rhettinger, xuanji
Date 2011-01-15.17:32:40
SpamBayes Score 1.385656e-10
Marked as misclassified No
Message-id <20110115173231.GA1179@rubuntu>
In-reply-to <1295109591.77.0.618551748872.issue3243@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2011-01-15 17:32:43orsenthilsetrecipients: + orsenthil, jhylton, georg.brandl, rhettinger, pitrou, catlee, eric.araujo, rcoyner, xuanji, davide.rizzo
2011-01-15 17:32:41orsenthillinkissue3243 messages
2011-01-15 17:32:40orsenthilcreate