1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Set content type of attachment even when no file name was found

This commit is contained in:
cketti 2012-02-27 23:20:30 +01:00
parent ba979808fe
commit e72afc1641

View File

@ -1692,6 +1692,12 @@ public class LocalStore extends Store implements Serializable {
contentDisposition,
name, // TODO: Should use encoded word defined in RFC 2231.
size));
} else {
bp.setHeader(MimeHeader.HEADER_CONTENT_TYPE, type);
bp.setHeader(MimeHeader.HEADER_CONTENT_DISPOSITION,
String.format("%s;\n size=%d",
contentDisposition,
size));
}
bp.setHeader(MimeHeader.HEADER_CONTENT_ID, contentId);