diff --git a/ChangeLog b/ChangeLog index bc8607898..40e04892f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-14 Richard Frith-Macdonald + + * Source/Additions/GSMime.m: Add tweak to cope with buggy mailers + which insert space after the boundary in a multipart document. + 2005-04-13 Adam Fedor * ANNOUNCE, NEWS, Documentation/news.texi, diff --git a/Source/Additions/GSMime.m b/Source/Additions/GSMime.m index eabaae223..f3e40d063 100644 --- a/Source/Additions/GSMime.m +++ b/Source/Additions/GSMime.m @@ -2364,6 +2364,16 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info); eol += 2; lastPart = YES; } + /* + * Ignore space/tab characters after boundry marker + * and before crlf. Strictly this is wrong ... but + * at least one mailer generates bogus whitespace here. + */ + while (eol < dataEnd + && (bytes[eol] == ' ' || bytes[eol] == '\t')) + { + eol++; + } if (eol < dataEnd && bytes[eol] == '\r') { eol++;