Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, barry, oopos
Date 2009-01-15.16:45:22
SpamBayes Score 0.0454237
Marked as misclassified No
Message-id <1232037925.21.0.269096812132.issue4953@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the test case. I reproduced it easily.
There is indeed a real problem in CGI streams.

The first thing to do is to start python with the -u option (add it to
the end of the first #! line), so that stdin yields bytes instead of
unicode chars, and \r\n are not translated on Windows.

Even then, I noticed that in the multipart/form-data section, text
fields are utf-8 encoded, but the file content is raw binary.
(FWIW, I use Firefox and Apache on Windows)
No encoding seems to be specified, neither in the content, nor in the
environment (no HTTP_TRANSFER_ENCODING)

And of course, the email.parser.FeedParser object used to parse it
accepts only unicode, not bytes.
Help needed.
History
Date User Action Args
2009-01-15 16:45:25amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, barry, oopos
2009-01-15 16:45:25amaury.forgeotdarcsetmessageid: <1232037925.21.0.269096812132.issue4953@psf.upfronthosting.co.za>
2009-01-15 16:45:24amaury.forgeotdarclinkissue4953 messages
2009-01-15 16:45:23amaury.forgeotdarccreate