[plug] MIME Types by file contents

Craig Ringer craig at postnewspapers.com.au
Mon Jul 5 17:05:02 WST 2004


Bernd Felsche wrote:
> I've narrowed this down to what could be a bug in the Message module
> os Python 2.2's email package; either the __str__(), as_string() or
> set_payload() methods.
> 
> Inserting a blank line at the start of the problematic files, which
> are saved Usenet articles, works around the problem.

Hmm. That should cause the module to read the entire lot as body text, 
with no headers. That would tend to suggest a bug in the Message class 
or one of its subclasses to do with parsing text/news headers. Is it 
definitely made to be able to handle news articles?

> Any suggestions, other than automagically inserting the blank line
> for text/news type files?

No idea, sorry. I haven't worked with text/news at all.

--
Rraig Ringer






More information about the plug mailing list