Bug 1693156 - Fix content-type of MimePart wrapped in a signed message. r=mkmelin

Should not hardcode the type, but inherit from the original MimePart.
This commit is contained in:
Ping Chen 2021-02-24 12:47:44 +02:00
Родитель 7d675f963b
Коммит e8354e8885
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -464,7 +464,7 @@ class MimeMessage {
if (curPart.parts.length > 1) {
// Move child parts one layer deeper so that the message is still well
// formed after crypto encaspsulation.
let newChild = new MimeMultiPart("mixed");
let newChild = new MimeMultiPart(curPart.subtype);
newChild.parts = curPart._parts;
curPart.parts = [newChild];
}

Просмотреть файл

@ -286,6 +286,7 @@ class MimeMultiPart extends MimePart {
*/
constructor(subtype) {
super();
this.subtype = subtype;
this._separator = this._makePartSeparator();
this.setHeader(
"content-type",