node_modules: update

This commit is contained in:
Dawid Dziurla
2020-11-12 16:30:46 +01:00
parent 2b66ab09bf
commit 6fd4a30225
20 changed files with 168 additions and 81 deletions

View File

@ -530,6 +530,7 @@ class MimeNode {
}
value = mimeFuncs.buildHeaderValue(structured);
break;
case 'Content-Type':
structured = mimeFuncs.parseHeaderValue(value);
@ -554,6 +555,7 @@ class MimeNode {
value += '; name=' + param;
}
break;
case 'Bcc':
if (!this.keepBcc) {
// skip BCC values
@ -997,7 +999,7 @@ class MimeNode {
.trim()
.toLowerCase()
// use uppercase words, except MIME
.replace(/^X-SMTPAPI$|^(MIME|DKIM)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
.replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
// special case
.replace(/^Content-Features$/i, 'Content-features');
@ -1099,6 +1101,11 @@ class MimeNode {
value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
return this._encodeWords(value);
case 'Content-Type':
case 'Content-Disposition':
// if it includes a filename then it is already encoded
return (value || '').toString().replace(/\r?\n|\r/g, ' ');
default:
value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
// encodeWords only encodes if needed, otherwise the original string is returned