From: helge Date: Sat, 5 Mar 2005 21:58:20 +0000 (+0000) Subject: fixed OGo issue #1282, \r\n handling X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef385ddd7458e19a04cc9516e7065cc63e99e45d;p=sope fixed OGo issue #1282, \r\n handling git-svn-id: http://svn.opengroupware.org/SOPE/trunk@620 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-mime/ChangeLog b/sope-mime/ChangeLog index e5f06fa4..ded5fc96 100644 --- a/sope-mime/ChangeLog +++ b/sope-mime/ChangeLog @@ -1,5 +1,8 @@ 2005-03-05 Helge Hess + * NGMime: fixed an issue with incorrect header field termination + (v4.5.217) + * NGImap4: fixed a MacOSX incompatibility (v4.5.216) 2005-03-03 Helge Hess diff --git a/sope-mime/NGMime/ChangeLog b/sope-mime/NGMime/ChangeLog index fbba16db..7f0e2c61 100644 --- a/sope-mime/NGMime/ChangeLog +++ b/sope-mime/NGMime/ChangeLog @@ -1,3 +1,8 @@ +2005-03-05 Helge Hess + + * NGMimePartGenerator.m: properly terminate header fields with \r\n + (OGo bug #1282) + 2005-01-30 Helge Hess * NGMimeContentTypeHeaderFieldGenerator.m, NGPart.m: fixed default diff --git a/sope-mime/NGMime/NGMimePartGenerator.m b/sope-mime/NGMime/NGMimePartGenerator.m index d3793f6c..0e915e7e 100644 --- a/sope-mime/NGMime/NGMimePartGenerator.m +++ b/sope-mime/NGMime/NGMimePartGenerator.m @@ -19,12 +19,12 @@ 02111-1307, USA. */ -#import "NGMimePartGenerator.h" -#import "NGMimeHeaderFieldGenerator.h" -#import "NGMimeBodyGenerator.h" -#import "NGMimeJoinedData.h" -#import -#import "common.h" +#include "NGMimePartGenerator.h" +#include "NGMimeHeaderFieldGenerator.h" +#include "NGMimeBodyGenerator.h" +#include "NGMimeJoinedData.h" +#include +#include "common.h" @implementation NGMimePartGenerator @@ -144,7 +144,7 @@ static BOOL debugOn = NO; id value = nil; const char *bytes = NULL; unsigned len = 0; - + res = [NSMutableData dataWithCapacity:64]; bytes = [_headerField cString]; len = [_headerField length]; @@ -154,13 +154,13 @@ static BOOL debugOn = NO; bytes++; len--; } - while ((value = [_values nextObject])) { + while ((value = [_values nextObject]) != nil) { data = [self generateDataForHeaderField:(NSString *)_headerField value:value]; [res appendBytes:bytes length:len]; [res appendBytes:": " length:2]; [res appendData:data]; - [res appendBytes:"\n" length:1]; + [res appendBytes:"\r\n" length:2]; } return res; } diff --git a/sope-mime/Version b/sope-mime/Version index 126abde2..981f7bf8 100644 --- a/sope-mime/Version +++ b/sope-mime/Version @@ -2,7 +2,7 @@ MAJOR_VERSION:=4 MINOR_VERSION:=5 -SUBMINOR_VERSION:=216 +SUBMINOR_VERSION:=217 # v4.5.214 requires libNGExtensions v4.5.146 # v4.2.149 requires libNGStreams v4.2.34