[gmime-devel] problem with BOM in header



Hi,

I have some spam mails, which have a utf-16 byte order mark
(BOM) U+FEFF as the first character in one of their "Received:"
lines, before the "From", etc. header lines. When I do 

g_mime_object_get_header (GMIME_OBJECT(message),"From")

I simply get the string "(null)", but not the actual "From" field.  I
suspect that gmime chokes on parsing the BOM, and considers the
remainder of the message to be part of the body.  Is this the expected
behavior or is this a bug in gmime? 

Maybe gmime could simply ignore BOMs independent of whether they appear
in the header or body of a message?

Andreas

P.S. I have originally reported this problem on the "notmuch" mailing
list, and the relevant thread can be accessed through
http://notmuchmail.org/pipermail/notmuch/2014/018450.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]