improved multipart handling using EAS

This commit is contained in:
Ludovic Marcotte committed 2015-03-30 09:42:32 -04:00
1 parent ddcae9f132
commit 491d7aaffc
4 files changed
+26 -3

No files matched your search

+2 -1
View File
@@ -2630,7 +2630,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
aSelector = NSSelectorFromString(cmdName);
// The -processItemOperations: method will generate a multipart response when Content-Type is application/vnd.ms-sync.multipart
if ([[theRequest headerForKey: @"MS-ASAcceptMultiPart"] isEqualToString:@"T"])
if (([cmdName rangeOfString: @"ItemOperations" options: NSCaseInsensitiveSearch].location != NSNotFound) &&
([[theRequest headerForKey: @"MS-ASAcceptMultiPart"] isEqualToString:@"T"] || [[theRequest uri] acceptsMultiPart]))
[theResponse setHeader: @"application/vnd.ms-sync.multipart" forKey: @"Content-Type"];
else
[theResponse setHeader: @"application/vnd.ms-sync.wbxml" forKey: @"Content-Type"];