Monotone-Parent: 29cab050b6cbbacab8016696a0af703cc5988d64

Monotone-Revision: b4864301d33bcd83b867c526d61b7fbf700afd5a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-09-04T05:49:37
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-09-04 05:49:37 +00:00
parent 0cd3089513
commit 95bba25b95
+19 -17
View File
@@ -604,7 +604,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
static __inline__ NSException *_consumeIfMatch
(NGImap4ResponseParser *self, unsigned char _m);
@@ -649,12 +652,35 @@
@@ -649,12 +652,37 @@
}
- (NSString *)_parseQuotedString {
@@ -635,14 +635,16 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
+ quotedString = nil;
+ }
+
+ [quotedString replaceString:@"?=\t=?"
+ withString:@"?==?"];
+ if ([quotedString rangeOfString: @"=?"].location != NSNotFound) {
+ [quotedString replaceString: @"?= =?" withString: @"?==?"];
+ [quotedString replaceString: @"?=\t=?" withString: @"?==?"];
+ }
+
+ return quotedString;
}
- (void)_consumeOptionalSpace {
if (_la(self, 0) == ' ') _consume(self, 1);
@@ -1090,6 +1116,8 @@
@@ -1090,6 +1118,8 @@
return @"";
s = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
@@ -651,7 +653,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
if (s == nil) {
[self logWithFormat:
@"ERROR(%s): could not convert data (%d bytes) into string.",
@@ -1185,7 +1213,7 @@
@@ -1185,7 +1215,7 @@
route = [self _parseQuotedStringOrNIL]; [self _consumeOptionalSpace];
mailbox = [self _parseQuotedStringOrNIL]; [self _consumeOptionalSpace];
host = [self _parseQuotedStringOrNIL]; [self _consumeOptionalSpace];
@@ -660,7 +662,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
if (_la(self, 0) != ')') {
[self logWithFormat:@"WARNING: IMAP4 envelope "
@"address not properly closed (c0=%c,c1=%c): %@",
@@ -1197,6 +1225,7 @@
@@ -1197,6 +1227,7 @@
address = [[NGImap4EnvelopeAddress alloc] initWithPersonalName:pname
sourceRoute:route mailbox:mailbox
host:host];
@@ -668,7 +670,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
return address;
}
@@ -1594,8 +1623,11 @@
@@ -1594,8 +1625,11 @@
if (_decode)
data = [data decodeQuotedPrintableValueOfMIMEHeaderField:nil];
@@ -682,7 +684,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
}
else {
str = _parseUntil2(self, ' ', ')');
@@ -1620,13 +1652,35 @@
@@ -1620,13 +1654,35 @@
return str;
}
@@ -719,7 +721,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
static NSDictionary *_parseBodyParameterList(NGImap4ResponseParser *self)
{
NSMutableDictionary *list;
@@ -1646,7 +1700,7 @@
@@ -1646,7 +1702,7 @@
_consumeIfMatch(self, ' ');
value = _parseBodyDecodeString(self, YES, YES);
@@ -728,7 +730,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
}
_consumeIfMatch(self, ')');
}
@@ -1731,13 +1785,14 @@
@@ -1731,13 +1787,14 @@
static NSDictionary *_parseSingleBody(NGImap4ResponseParser *self,
BOOL isBodyStructure) {
NSString *type, *subtype, *bodyId, *description,
@@ -745,7 +747,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
_consumeIfMatch(self, ' ');
parameterList = _parseBodyParameterList(self);
_consumeIfMatch(self, ' ');
@@ -1762,13 +1817,18 @@
@@ -1762,13 +1819,18 @@
_consumeIfMatch(self, ' ');
[dict setObject:_parseBodyString(self, YES) forKey:@"lines"];
}
@@ -767,7 +769,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
_consumeIfMatch(self, ' ');
[dict setObject:_parseParenthesizedAddressList(self) forKey:@"from"];
_consumeIfMatch(self, ' ');
@@ -1783,14 +1843,20 @@
@@ -1783,14 +1845,20 @@
_consumeIfMatch(self, ' ');
[dict setObject:_parseParenthesizedAddressList(self) forKey:@"bcc"];
_consumeIfMatch(self, ' ');
@@ -791,7 +793,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
}
}
@@ -1805,14 +1871,9 @@
@@ -1805,14 +1873,9 @@
forKey: @"disposition"];
if (_la(self, 0) != ')') {
_consume(self,1);
@@ -809,7 +811,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
if (_la(self, 0) != ')') {
_consume(self,1);
[dict setObject: _parseBodyString(self, YES)
@@ -1829,6 +1890,7 @@
@@ -1829,6 +1892,7 @@
static NSDictionary *_parseMultipartBody(NGImap4ResponseParser *self,
BOOL isBodyStructure) {
NSMutableArray *parts;
@@ -817,7 +819,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
NSString *kind;
NSMutableDictionary *dict;
@@ -1854,14 +1916,9 @@
@@ -1854,14 +1918,9 @@
forKey: @"disposition"];
if (_la(self, 0) != ')') {
_consume(self,1);
@@ -835,7 +837,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
if (_la(self, 0) != ')') {
_consume(self,1);
[dict setObject: _parseBodyString(self, YES)
@@ -2170,6 +2227,21 @@
@@ -2170,6 +2229,21 @@
}
}
@@ -857,7 +859,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m
- (NSException *)exceptionForFailedMatch:(unsigned char)_match
got:(unsigned char)_avail
{
@@ -2225,9 +2297,9 @@
@@ -2225,9 +2299,9 @@
[s release];
if (c == '\n') {