Senthil Kumaran added the comment:

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.

----------
assignee:  -> orsenthil
keywords: +patch
stage:  -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file31980/19097.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19097>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to