+Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m
+===================================================================
+--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1551)
++++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail)
+@@ -713,6 +713,39 @@
+ return ms;
+ }
+
++/* GCSEOAdaptorChannel protocol */
++static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \
++ @" c_name VARCHAR (256) NOT NULL,\n"
++ @" c_content VARCHAR (100000) NOT NULL,\n"
++ @" c_creationdate INT4 NOT NULL,\n"
++ @" c_lastmodified INT4 NOT NULL,\n"
++ @" c_version INT4 NOT NULL,\n"
++ @" c_deleted INT4 NULL\n"
++ @")");
++static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \
++ @" c_uid VARCHAR (256) NOT NULL,\n"
++ @" c_object VARCHAR (256) NOT NULL,\n"
++ @" c_role VARCHAR (80) NOT NULL\n"
++ @")");
++
++- (NSException *) createGCSFolderTableWithName: (NSString *) tableName
++{
++ NSString *sql;
++
++ sql = [NSString stringWithFormat: sqlFolderFormat, tableName];
++
++ return [self evaluateExpressionX: sql];
++}
++
++- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName
++{
++ NSString *sql;
++
++ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName];
++
++ return [self evaluateExpressionX: sql];
++}
++
+ @end /* PostgreSQL72Channel */
+
+ @implementation PostgreSQL72Channel(PrimaryKeyGeneration)
Index: sope-mime/NGImap4/NGImap4Connection.m
===================================================================
---- sope-mime/NGImap4/NGImap4Connection.m (révision 1548)
+--- sope-mime/NGImap4/NGImap4Connection.m (révision 1551)
+++ sope-mime/NGImap4/NGImap4Connection.m (copie de travail)
@@ -381,7 +381,7 @@
[self errorWithFormat:@"Could not list mailbox hierarchy!"];
Index: sope-mime/NGImap4/NGImap4ResponseNormalizer.m
===================================================================
---- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1548)
+--- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1551)
+++ sope-mime/NGImap4/NGImap4ResponseNormalizer.m (copie de travail)
@@ -648,14 +648,13 @@
enumerator = [_flags objectEnumerator];
if (objs) free(objs);
Index: sope-mime/NGImap4/NGImap4ResponseParser.m
===================================================================
---- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1548)
+--- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1551)
+++ sope-mime/NGImap4/NGImap4ResponseParser.m (copie de travail)
@@ -84,6 +84,8 @@
static NSDictionary *_parseMultipartBody(NGImap4ResponseParser *self,
{
Index: sope-mime/NGMail/NGSmtpClient.m
===================================================================
---- sope-mime/NGMail/NGSmtpClient.m (révision 1548)
+--- sope-mime/NGMail/NGSmtpClient.m (révision 1551)
+++ sope-mime/NGMail/NGSmtpClient.m (copie de travail)
-@@ -442,10 +442,10 @@
+@@ -24,6 +24,82 @@
+ #include "NGSmtpReplyCodes.h"
+ #include "common.h"
+
++//
++// Useful extension that comes from Pantomime which is also
++// released under the LGPL.
++//
++@interface NSMutableData (DataCleanupExtension)
++
++- (NSRange) rangeOfCString: (const char *) theCString;
++- (NSRange) rangeOfCString: (const char *) theCString
++ options: (unsigned int) theOptions
++ range: (NSRange) theRange;
++@end
++
++@implementation NSMutableData (DataCleanupExtension)
++
++- (NSRange) rangeOfCString: (const char *) theCString
++{
++ return [self rangeOfCString: theCString
++ options: 0
++ range: NSMakeRange(0,[self length])];
++}
++
++-(NSRange) rangeOfCString: (const char *) theCString
++ options: (unsigned int) theOptions
++ range: (NSRange) theRange
++{
++ const char *b, *bytes;
++ int i, len, slen;
++
++ if (!theCString)
++ {
++ return NSMakeRange(NSNotFound,0);
++ }
++
++ bytes = [self bytes];
++ len = [self length];
++ slen = strlen(theCString);
++
++ b = bytes;
++
++ if (len > theRange.location + theRange.length)
++ {
++ len = theRange.location + theRange.length;
++ }
++
++ if (theOptions == NSCaseInsensitiveSearch)
++ {
++ i = theRange.location;
++ b += i;
++
++ for (; i <= len-slen; i++, b++)
++ {
++ if (!strncasecmp(theCString,b,slen))
++ {
++ return NSMakeRange(i,slen);
++ }
++ }
++ }
++ else
++ {
++ i = theRange.location;
++ b += i;
++
++ for (; i <= len-slen; i++, b++)
++ {
++ if (!memcmp(theCString,b,slen))
++ {
++ return NSMakeRange(i,slen);
++ }
++ }
++ }
++
++ return NSMakeRange(NSNotFound,0);
++}
++
++@end
++
+ @interface NGSmtpClient(PrivateMethods)
+ - (void)_fetchExtensionInfo;
+ @end
+@@ -429,7 +505,9 @@
+
+ - (BOOL)sendData:(NSData *)_data {
+ NGSmtpResponse *reply = nil;
+-
++ NSMutableData *cleaned_data;
++ NSRange r1, r2;
++
+ [self requireState:NGSmtpState_TRANSACTION];
+
+ reply = [self sendCommand:@"DATA"];
+@@ -441,11 +519,54 @@
+ }
[self->text flush];
++ cleaned_data = [NSMutableData dataWithData: _data];
++
++ //
++ // According to RFC 2821 section 4.5.2, we must check for the character
++ // sequence "<CRLF>.<CRLF>"; any occurrence have its period duplicated
++ // to avoid data transparency.
++ //
++ // The following code was copied from Pantomime (and also the one
++ // that strips Bcc: headers from the mail's content)
++ //
++ r1 = [cleaned_data rangeOfCString: "\r\n."];
++
++ while (r1.location != NSNotFound)
++ {
++ [cleaned_data replaceBytesInRange: r1 withBytes: "\r\n.." length: 4];
++
++ r1 = [cleaned_data rangeOfCString: "\r\n."
++ options: 0
++ range: NSMakeRange(NSMaxRange(r1)+1, [cleaned_data length]-NSMaxRange(r1)-1)];
++ }
++
++ //
++ // We now look for the Bcc: header. If it is present, we remove it.
++ // Some servers, like qmail, do not remove it automatically.
++ //
++ r1 = [cleaned_data rangeOfCString: "\r\n\r\n"];
++ r1 = [cleaned_data rangeOfCString: "\r\nBcc: "
++ options: 0
++ range: NSMakeRange(0,r1.location-1)];
++
++ if (r1.location != NSNotFound)
++ {
++ // We search for the first \r\n AFTER the Bcc: header and
++ // replace the whole thing with \r\n.
++ r2 = [cleaned_data rangeOfCString: "\r\n"
++ options: 0
++ range: NSMakeRange(NSMaxRange(r1)+1,[cleaned_data length]-NSMaxRange(r1)-1)];
++ [cleaned_data replaceBytesInRange: NSMakeRange(r1.location, NSMaxRange(r2)-r1.location)
++ withBytes: "\r\n"
++ length: 2];
++ }
++
++
if (self->isDebuggingEnabled)
- [NGTextErr writeFormat:@"C: data(%i bytes) ..\n", [_data bytes]];
-+ [NGTextErr writeFormat:@"C: data(%i bytes) ..\n", [_data length]];
++ [NGTextErr writeFormat:@"C: data(%i bytes) ..\n", [cleaned_data length]];
- [self->connection safeWriteBytes:[_data bytes] count:[_data length]];
+- [self->connection safeWriteBytes:[_data bytes] count:[_data length]];
- [self->connection safeWriteBytes:".\r\n" count:3];
++ [self->connection safeWriteBytes:[cleaned_data bytes] count:[cleaned_data length]];
+ [self->connection safeWriteBytes:"\r\n.\r\n" count:5];
[self->connection flush];
reply = [self receiveReply];
Index: sope-mime/NGMail/NGMimeMessageGenerator.m
===================================================================
---- sope-mime/NGMail/NGMimeMessageGenerator.m (révision 1548)
+--- sope-mime/NGMail/NGMimeMessageGenerator.m (révision 1551)
+++ sope-mime/NGMail/NGMimeMessageGenerator.m (copie de travail)
@@ -86,37 +86,40 @@
char *des = NULL;
unsigned isoEndLen = 2;
Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m
===================================================================
---- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1548)
+--- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1551)
+++ sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (copie de travail)
@@ -285,24 +285,16 @@
- (id)parseValue:(id)_data ofHeaderField:(NSString *)_field {
bytes++;
Index: sope-mime/NGMime/NGMimeBodyPart.m
===================================================================
---- sope-mime/NGMime/NGMimeBodyPart.m (révision 1548)
+--- sope-mime/NGMime/NGMimeBodyPart.m (révision 1551)
+++ sope-mime/NGMime/NGMimeBodyPart.m (copie de travail)
@@ -31,18 +31,6 @@
return 2;
- (NSString *)contentId {
Index: sope-mime/NGMime/NGMimeBodyParser.m
===================================================================
---- sope-mime/NGMime/NGMimeBodyParser.m (révision 1548)
+--- sope-mime/NGMime/NGMimeBodyParser.m (révision 1551)
+++ sope-mime/NGMime/NGMimeBodyParser.m (copie de travail)
@@ -67,7 +67,10 @@
if (_data == nil) return nil;
Index: sope-mime/NGMime/NGMimePartParser.h
===================================================================
---- sope-mime/NGMime/NGMimePartParser.h (révision 1548)
+--- sope-mime/NGMime/NGMimePartParser.h (révision 1551)
+++ sope-mime/NGMime/NGMimePartParser.h (copie de travail)
@@ -117,6 +117,7 @@
BOOL parserParseRawBodyDataOfPart:1;
@interface NSObject(NGMimePartParser)
Index: sope-mime/NGMime/NGMimePartParser.m
===================================================================
---- sope-mime/NGMime/NGMimePartParser.m (révision 1548)
+--- sope-mime/NGMime/NGMimePartParser.m (révision 1551)
+++ sope-mime/NGMime/NGMimePartParser.m (copie de travail)
@@ -227,7 +227,7 @@
}
: [NGMimeType mimeType:[ctype stringValue]];
Index: sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m
===================================================================
---- sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (révision 1548)
+--- sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (révision 1551)
+++ sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (copie de travail)
@@ -49,80 +49,70 @@
}
return data;
}
-Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m
-===================================================================
---- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1548)
-+++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail)
-@@ -713,6 +713,39 @@
- return ms;
- }
-
-+/* GCSEOAdaptorChannel protocol */
-+static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \
-+ @" c_name VARCHAR (256) NOT NULL,\n"
-+ @" c_content VARCHAR (100000) NOT NULL,\n"
-+ @" c_creationdate INT4 NOT NULL,\n"
-+ @" c_lastmodified INT4 NOT NULL,\n"
-+ @" c_version INT4 NOT NULL,\n"
-+ @" c_deleted INT4 NULL\n"
-+ @")");
-+static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \
-+ @" c_uid VARCHAR (256) NOT NULL,\n"
-+ @" c_object VARCHAR (256) NOT NULL,\n"
-+ @" c_role VARCHAR (80) NOT NULL\n"
-+ @")");
-+
-+- (NSException *) createGCSFolderTableWithName: (NSString *) tableName
-+{
-+ NSString *sql;
-+
-+ sql = [NSString stringWithFormat: sqlFolderFormat, tableName];
-+
-+ return [self evaluateExpressionX: sql];
-+}
-+
-+- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName
-+{
-+ NSString *sql;
-+
-+ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName];
-+
-+ return [self evaluateExpressionX: sql];
-+}
-+
- @end /* PostgreSQL72Channel */
-
- @implementation PostgreSQL72Channel(PrimaryKeyGeneration)
Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m
===================================================================
---- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1548)
+--- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1551)
+++ sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (copie de travail)
@@ -140,8 +140,12 @@
static char *iconv_wrapper(id self, char *_src, unsigned _srcLen,
Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h
===================================================================
---- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (révision 1548)
+--- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (révision 1551)
+++ sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (copie de travail)
@@ -19,6 +19,8 @@
02111-1307, USA.
#include <SaxObjC/SaxXMLReader.h>
#include <SaxObjC/SaxLexicalHandler.h>
#include <SaxObjC/SaxDeclHandler.h>
+@@ -34,7 +36,7 @@
+
+ @interface libxmlHTMLSAXDriver : NSObject < SaxXMLReader >
+ {
+- id<NSObject,SaxContentHandler> contentHandler;
++ NSObject<SaxContentHandler> *contentHandler;
+ id<NSObject,SaxDTDHandler> dtdHandler;
+ id<NSObject,SaxErrorHandler> errorHandler;
+ id<NSObject,SaxEntityResolver> entityResolver;
Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m
===================================================================
---- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (révision 1548)
+--- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (révision 1551)
+++ sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (copie de travail)
@@ -30,6 +30,12 @@
#include <libxml/HTMLparser.h>
@interface libxmlHTMLSAXDriver(PrivateMethods)
- (void)tearDownParser;
+@@ -194,10 +200,10 @@
+ return self->entityResolver;
+ }
+
+-- (void)setContentHandler:(id<NSObject,SaxContentHandler>)_handler {
++- (void)setContentHandler:(NSObject <NSObject,SaxContentHandler> *)_handler {
+ ASSIGN(self->contentHandler, _handler);
+ }
+-- (id<NSObject,SaxContentHandler>)contentHandler {
++- (NSObject <NSObject,SaxContentHandler> *)contentHandler {
+ return self->contentHandler;
+ }
+
@@ -205,6 +211,7 @@
- (void)setupParserWithDocumentPath:(NSString *)_path {
- (void)tearDownParser {
Index: sope-appserver/NGObjWeb/GNUmakefile.postamble
===================================================================
---- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1548)
+--- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1551)
+++ sope-appserver/NGObjWeb/GNUmakefile.postamble (copie de travail)
@@ -23,14 +23,20 @@
-endif
Index: sope-appserver/NGObjWeb/WOContext.m
===================================================================
---- sope-appserver/NGObjWeb/WOContext.m (révision 1548)
+--- sope-appserver/NGObjWeb/WOContext.m (révision 1551)
+++ sope-appserver/NGObjWeb/WOContext.m (copie de travail)
@@ -64,11 +64,13 @@
static BOOL testNSURLs = NO;
serverURL = [@"http://" stringByAppendingString:host];
Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m
===================================================================
---- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (révision 1548)
+--- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (révision 1551)
+++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (copie de travail)
@@ -216,6 +216,12 @@
assocCount++;
Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m
===================================================================
---- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1548)
+--- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1551)
+++ sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (copie de travail)
@@ -40,6 +40,7 @@
WOAssociation *string;
return YES;
Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h
===================================================================
---- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1548)
+--- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1551)
+++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (copie de travail)
@@ -41,7 +41,8 @@
WOAssociation *pageName;
/* 'ivar' associations */
Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m
===================================================================
---- sope-appserver/NGObjWeb/SoObjects/SoObject.m (révision 1548)
+--- sope-appserver/NGObjWeb/SoObjects/SoObject.m (révision 1551)
+++ sope-appserver/NGObjWeb/SoObjects/SoObject.m (copie de travail)
@@ -39,22 +39,34 @@
static int debugLookup = -1;
Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
===================================================================
---- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1548)
+--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1551)
+++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (copie de travail)
@@ -31,6 +31,7 @@
#include <NGObjWeb/WOCookie.h>
else if ([st isEqualToString:@"alternative"])
return [self alternativeViewer];
- if ([st isEqualToString:@"report"])
- /* this is used by mail-delivery reports */
- return [self mixedViewer];
+ if ([st isEqualToString:@"report"])
+ /* this is used by mail-delivery reports */
+ return [self mixedViewer];
}
else if ([mt isEqualToString:@"text"])
{
- if ([st isEqualToString:@"plain"] || [st isEqualToString:@"html"]) {
- if (!showNamedTextAttachmentsInline && [self _shouldDisplayAsAttachment: _info])
- return [self linkViewer];
+ if ([st isEqualToString:@"plain"] || [st isEqualToString:@"html"]) {
+ if (!showNamedTextAttachmentsInline && [self _shouldDisplayAsAttachment: _info])
+ return [self linkViewer];
- return [st isEqualToString:@"html"]
- ? [self htmlViewer] : [self textViewer];
- }
+ return [st isEqualToString:@"html"]
+ ? [self htmlViewer] : [self textViewer];
+ }
- if ([st isEqualToString:@"calendar"])
- return [self iCalViewer];
+ if ([st isEqualToString:@"calendar"])
+ return [self iCalViewer];
}
if ([mt isEqualToString:@"image"])
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; host plop.com[64.39.31.55] said: 550 5.7.1
- <ioioi@plop.com>... Relaying denied
+ <ioioi@plop.com>... Relaying denied
*/
// Note: we cannot use the text viewer because the body is not pre-fetched
return [self linkViewer];
{
// octet-stream (generate download link?, autodetect type?)
- if ([st hasPrefix:@"x-vnd.kolab."])
- {
- if ([st isEqualToString:@"x-vnd.kolab.contact"])
- return [self kolabContactViewer];
- if ([st isEqualToString:@"x-vnd.kolab.event"])
- return [self kolabEventViewer];
- if ([st isEqualToString:@"x-vnd.kolab.task"])
- return [self kolabTodoViewer];
- if ([st isEqualToString:@"x-vnd.kolab.note"])
- return [self kolabNoteViewer];
- if ([st isEqualToString:@"x-vnd.kolab.journal"])
- return [self kolabJournalViewer];
- if ([st isEqualToString:@"x-vnd.kolab.contact.distlist"])
- return [self kolabDistributionListViewer];
+ if ([st hasPrefix:@"x-vnd.kolab."])
+ {
+ if ([st isEqualToString:@"x-vnd.kolab.contact"])
+ return [self kolabContactViewer];
+ if ([st isEqualToString:@"x-vnd.kolab.event"])
+ return [self kolabEventViewer];
+ if ([st isEqualToString:@"x-vnd.kolab.task"])
+ return [self kolabTodoViewer];
+ if ([st isEqualToString:@"x-vnd.kolab.note"])
+ return [self kolabNoteViewer];
+ if ([st isEqualToString:@"x-vnd.kolab.journal"])
+ return [self kolabJournalViewer];
+ if ([st isEqualToString:@"x-vnd.kolab.contact.distlist"])
+ return [self kolabDistributionListViewer];
- [self errorWithFormat:@"found no viewer for Kolab type: %@/%@", mt, st];
- return [self linkViewer];
- }
-
+ [self errorWithFormat:@"found no viewer for Kolab type: %@/%@", mt, st];
+ return [self linkViewer];
+ }
+ else if ([st isEqualToString:@"ics"]) /* Cooqle K4lendahr - Google Calendar */
+ return [self iCalViewer];
+
#if 0 /* the link viewer looks better than plain text ;-) */
- if ([st isEqualToString:@"pgp-signature"]) // TODO: real PGP viewer
- return [self textViewer];
+ if ([st isEqualToString:@"pgp-signature"]) // TODO: real PGP viewer
+ return [self textViewer];
#endif
}