2005-03-05 Helge Hess <helge.hess@opengroupware.org>
+ * 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 <helge.hess@opengroupware.org>
+2005-03-05 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGMimePartGenerator.m: properly terminate header fields with \r\n
+ (OGo bug #1282)
+
2005-01-30 Helge Hess <helge.hess@opengroupware.org>
* NGMimeContentTypeHeaderFieldGenerator.m, NGPart.m: fixed default
02111-1307, USA.
*/
-#import "NGMimePartGenerator.h"
-#import "NGMimeHeaderFieldGenerator.h"
-#import "NGMimeBodyGenerator.h"
-#import "NGMimeJoinedData.h"
-#import <NGMime/NGMimeType.h>
-#import "common.h"
+#include "NGMimePartGenerator.h"
+#include "NGMimeHeaderFieldGenerator.h"
+#include "NGMimeBodyGenerator.h"
+#include "NGMimeJoinedData.h"
+#include <NGMime/NGMimeType.h>
+#include "common.h"
@implementation NGMimePartGenerator
id value = nil;
const char *bytes = NULL;
unsigned len = 0;
-
+
res = [NSMutableData dataWithCapacity:64];
bytes = [_headerField cString];
len = [_headerField length];
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;
}