(fix) properly split long headers (fixes #3152)
Conflicts: ActiveSync/SOGoMailObject+ActiveSync.mpull/203/head
parent
422d586035
commit
cd6c56953b
|
@ -2864,7 +2864,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
{
|
{
|
||||||
[map setObject: [mailObject messageId] forKey: @"in-reply-to"];
|
[map setObject: [mailObject messageId] forKey: @"in-reply-to"];
|
||||||
|
|
||||||
references = [[[[[mailObject mailHeaders] objectForKey: @"references"] componentsSeparatedByString: @" "] mutableCopy] autorelease];
|
references = [[[[[mailObject mailHeaders] objectForKey: @"references"] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] mutableCopy] autorelease];
|
||||||
|
|
||||||
// If there is no References: header, initialize it with In-Reply-To.
|
// If there is no References: header, initialize it with In-Reply-To.
|
||||||
if ([mailObject inReplyTo] && ![references count])
|
if ([mailObject inReplyTo] && ![references count])
|
||||||
|
|
|
@ -32,6 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#import <Foundation/NSCalendarDate.h>
|
#import <Foundation/NSCalendarDate.h>
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSException.h>
|
#import <Foundation/NSException.h>
|
||||||
|
#import <Foundation/NSString.h>
|
||||||
|
#import <Foundation/NSCharacterSet.h>
|
||||||
|
|
||||||
#import <NGCards/iCalCalendar.h>
|
#import <NGCards/iCalCalendar.h>
|
||||||
#import <NGCards/iCalDateTime.h>
|
#import <NGCards/iCalDateTime.h>
|
||||||
|
@ -1186,9 +1188,9 @@ struct GlobalObjectId {
|
||||||
value = [[self mailHeaders] objectForKey: @"references"];
|
value = [[self mailHeaders] objectForKey: @"references"];
|
||||||
|
|
||||||
if ([value isKindOfClass: [NSArray class]])
|
if ([value isKindOfClass: [NSArray class]])
|
||||||
reference = [[[value objectAtIndex: 0] componentsSeparatedByString: @" "] objectAtIndex: 0];
|
reference = [[[value objectAtIndex: 0] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] objectAtIndex: 0];
|
||||||
else
|
else
|
||||||
reference = [[value componentsSeparatedByString: @" "] objectAtIndex: 0];
|
reference = [[value componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] objectAtIndex: 0];
|
||||||
|
|
||||||
if ([reference length] > 0)
|
if ([reference length] > 0)
|
||||||
[s appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[reference dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
|
[s appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[reference dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
|
||||||
|
|
Loading…
Reference in New Issue