Skip to content

Commit

Permalink
fix(eas): avoid generating broken XML ouput (fixes #4927)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Jan 8, 2020
1 parent f0980a9 commit 047a98b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ActiveSync/SOGoActiveSyncDispatcher+Sync.m
Expand Up @@ -2592,7 +2592,6 @@ - (void) processSync: (id <DOMElement>) theDocumentElement
//[output appendFormat: @"<Status>%d</Status>", 14];
}

[output appendString: @"<Collections>"];
s = nil;

// We enter our loop detection change
Expand Down Expand Up @@ -2695,6 +2694,8 @@ - (void) processSync: (id <DOMElement>) theDocumentElement
//
if (changeDetected || [[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"] || [[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"12.0"])
{
[output appendString: @"<Collections>"];

// We always return the last generated response.
// If we only return <Sync><Collections/></Sync>,
// iOS powered devices will simply crash.
Expand Down

0 comments on commit 047a98b

Please sign in to comment.