fix(mail): use encoding from MIME part

This commit is contained in:
Francis Lachapelle
2022-07-05 08:59:48 -04:00
parent 6bed6c0e20
commit 27d45b6d76

View File

@@ -513,11 +513,12 @@ static BOOL debugOn = NO;
// [self debugWithFormat:@" fetched %d bytes: %@", [data length],
// [self partInfo]];
// TODO: wrong, could be encoded
response = [localContext response];
mimeType = [self davContentType];
if ([mimeType isEqualToString: @"application/x-xpinstall"])
mimeType = @"application/octet-stream";
else if (!asAttachment)
mimeType = [self contentTypeForBodyPartInfo: [self partInfo]];
[response setHeader: mimeType forKey: @"content-type"];
[response setHeader: [NSString stringWithFormat:@"%d", (int)[data length]]