Message126342
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. |
|
Date |
User |
Action |
Args |
2011-01-15 17:32:43 | orsenthil | set | recipients:
+ orsenthil, jhylton, georg.brandl, rhettinger, pitrou, catlee, eric.araujo, rcoyner, xuanji, davide.rizzo |
2011-01-15 17:32:41 | orsenthil | link | issue3243 messages |
2011-01-15 17:32:40 | orsenthil | create | |
|