From d37e439f796e42bc16229fd0e0361ce0db000f0a Mon Sep 17 00:00:00 2001 From: CaS Date: Thu, 14 Apr 2005 04:30:38 +0000 Subject: [PATCH] iAdd workaround for a mail client bug git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21107 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/Additions/GSMime.m | 10 ++++++++++ 2 files changed, 15 insertions(+) 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++;