mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-20 13:17:08 +00:00
Added support for multipart/digest
This commit is contained in:
parent
ebcde39656
commit
129cbccf8d
2 changed files with 9 additions and 1 deletions
|
@ -434,7 +434,7 @@ public class InternetHeaders {
|
|||
}
|
||||
prevline = line;
|
||||
}
|
||||
if (first && android.text.TextUtils.isEmpty(line) && is instanceof ByteArrayInputStream) {
|
||||
if (false && first && android.text.TextUtils.isEmpty(line) && is instanceof ByteArrayInputStream) {
|
||||
// RFC1341 section 7.2.1
|
||||
// Note that the encapsulation boundary must occur at the beginning of a line, i.e., following a CRLF,
|
||||
// and that that initial CRLF is considered to be part of the encapsulation boundary rather than part of the preceding part.
|
||||
|
|
|
@ -873,6 +873,14 @@ public class MimeMultipart extends Multipart {
|
|||
buf.write(inbuf, 0, inSize);
|
||||
part = createMimeBodyPart(headers, buf.toByteArray());
|
||||
}
|
||||
try {
|
||||
// https://www.rfc-editor.org/rfc/rfc1521.html#section-7.2.4
|
||||
ContentType ct = new ContentType(getContentType());
|
||||
if ("multipart/digest".equalsIgnoreCase(ct.getBaseType()))
|
||||
part.setHeader("Content-Type", "message/rfc822");
|
||||
} catch (Throwable ex) {
|
||||
eu.faircode.email.Log.e(ex);
|
||||
}
|
||||
super.addBodyPart(part);
|
||||
}
|
||||
} catch (IOException ioex) {
|
||||
|
|
Loading…
Reference in a new issue