mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-28 17:42:44 +00:00
fix(attachment): properly download openxmlformats in attachments
This commit is contained in:
@@ -521,8 +521,9 @@ static BOOL debugOn = NO;
|
||||
else if (!asAttachment)
|
||||
mimeType = [self contentTypeForBodyPartInfo: [self partInfo]];
|
||||
|
||||
if([mimeType rangeOfString:@"xml"].location != NSNotFound || [mimeType rangeOfString:@"html"].location != NSNotFound
|
||||
if(([mimeType rangeOfString:@"xml"].location != NSNotFound || [mimeType rangeOfString:@"html"].location != NSNotFound
|
||||
|| [mimeType rangeOfString:@"css"].location != NSNotFound || [mimeType rangeOfString:@"javascript"].location != NSNotFound)
|
||||
&& [mimeType rangeOfString:@"openxmlformats"].location == NSNotFound )
|
||||
[response setHeader: @"text/plain" forKey: @"content-type"];
|
||||
else
|
||||
[response setHeader: mimeType forKey: @"content-type"];
|
||||
|
||||
Reference in New Issue
Block a user