mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 01:38:51 +00:00
Minor fixes for MailDAV
Monotone-Parent: 0e81c91aff9e32e69e1dda8e416902bf2f902245 Monotone-Revision: 426be27fca1a92348072172cc4db72658d765822 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-10-02T14:30:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1341,8 +1341,7 @@ static BOOL debugSoParts = NO;
|
||||
// date already exists, but this one is the correct format
|
||||
- (NSString *) davDate
|
||||
{
|
||||
return [[self date]
|
||||
descriptionWithCalendarFormat: @"%a, %d %b %Y %H:%M:%S %z"];
|
||||
return [[self date] rfc822DateString];
|
||||
}
|
||||
|
||||
- (BOOL) hasAttachment
|
||||
@@ -1401,7 +1400,7 @@ static BOOL debugSoParts = NO;
|
||||
encoding: NSUTF8StringEncoding];
|
||||
range = [value rangeOfString: @"received:"
|
||||
options: NSCaseInsensitiveSearch
|
||||
range: NSMakeRange (10, [value length]-11)];
|
||||
range: NSMakeRange (10, [value length] - 11)];
|
||||
if (range.length
|
||||
&& range.location < [value length]
|
||||
&& range.length < [value length])
|
||||
@@ -1433,7 +1432,8 @@ static BOOL debugSoParts = NO;
|
||||
{
|
||||
data = [fetch objectForKey: @"header"];
|
||||
value = [[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding];
|
||||
rc = [[value substringFromIndex: 11] stringByTrimmingSpaces];
|
||||
if (value && [value length] > 11)
|
||||
rc = [[value substringFromIndex: 11] stringByTrimmingSpaces];
|
||||
[value release];
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ Message-ID: <4AC1F29sept6.5060801@cyril.dev>
|
||||
Date: Tue, 29 Sep 2009 07:42:14 -0400
|
||||
From: Cyril <message1from@cyril.dev>
|
||||
User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605)
|
||||
References: <4AC3BF1B.3010806@inverse.ca>
|
||||
MIME-Version: 1.0
|
||||
To: message1to@cyril.dev
|
||||
CC: message1cc@cyril.dev, user10@cyril.dev
|
||||
@@ -535,8 +536,8 @@ class DAVMailCollectionTest(unittest.TestCase):
|
||||
("{urn:schemas:mailheader:}received", message1_received, 0),
|
||||
("{urn:schemas:mailheader:}references",
|
||||
"<4AC3BF1B.3010806@inverse.ca>", 0),
|
||||
("{urn:schemas:mailheader:}subject", "Hallo", 0),
|
||||
("{urn:schemas:mailheader:}to", "jacques@cyril.dev", 0))
|
||||
("{urn:schemas:mailheader:}subject", "message1subject", 0),
|
||||
("{urn:schemas:mailheader:}to", "message1to@cyril.dev", 0))
|
||||
|
||||
for test in tests:
|
||||
property, expected, isDate = test
|
||||
|
||||
Reference in New Issue
Block a user