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:
C Robert
2009-10-02 14:30:07 +00:00
parent a60ab92dc4
commit 3e35ec79c2
2 changed files with 7 additions and 6 deletions
+4 -4
View File
@@ -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];
}