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 gvanrossum, orsenthil
Date 2013-10-07.02:18:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381112289.85.0.890320241959.issue19097@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Guido,

Agree with both your points.

Attaching a patch that fixes this issue.

1. Raises TypeError exception when header is not a Mapping or email.message.Message type.
2. Asserts for fp.read and fp.readline() to assert that fp, the first argument to FieldStorage is a file like object. I would have preferred to assert fp as a type of BytesIO object, but I saw some tests failings, so that could be taken as a separate 3.4 only backwards incompatible improvement (and not bug fix).

Finally, in the cases where read_single() is called for FieldStorage(), bool() raises valid TypeError for empty FieldStorage.

Please review and if it is OK, I can check this in.
History
Date User Action Args
2013-10-07 02:18:09orsenthilsetrecipients: + orsenthil, gvanrossum
2013-10-07 02:18:09orsenthilsetmessageid: <1381112289.85.0.890320241959.issue19097@psf.upfronthosting.co.za>
2013-10-07 02:18:09orsenthillinkissue19097 messages
2013-10-07 02:18:09orsenthilcreate