[Email-SIG] why is this HeaderParseError being raised?

Tokio Kikuchi tkikuchi at is.kochi-u.ac.jp
Tue Oct 10 23:04:07 CEST 2006


Jason R. Mastaler wrote:
> I'm probably missing something obvious, but can someone tell me why
> email.header.decode_header() is blowing up when trying to decode the
> Subject header of this message?  It looks legitimate to me.  It's not
> a spam message, and was prodcued by Microsoft Outlook Express:
> 
> http://mastaler.com/tmp/1150650768.21756.msg.txt

You need two trailing paddings (=) in the encoded string.

Subject: 
=?iso-8859-1?B?UmU6IEFXOiBCZXN0ZWxsdW5nIEJhZ3RhZ3MgZvxyIEdvbGYgQ2x1YiBL/HNzbmFjaA?=
should be
Subject: 
=?iso-8859-1?B?UmU6IEFXOiBCZXN0ZWxsdW5nIEJhZ3RhZ3MgZvxyIEdvbGYgQ2x1YiBL/HNzbmFjaA==?=

In RFC3548,
Implementations MUST include appropriate pad characters at the end of
encoded data ...

-- 
Tokio Kikuchi, tkikuchi at is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/


More information about the Email-SIG mailing list