mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 08:06:59 +00:00
GODT-213: Force no transfer encoding for embedded message/rfc822 parts
This commit is contained in:
@ -93,8 +93,9 @@ func addTestAttachment(
|
|||||||
Name: name,
|
Name: name,
|
||||||
MIMEType: mimeType,
|
MIMEType: mimeType,
|
||||||
Header: map[string][]string{
|
Header: map[string][]string{
|
||||||
"Content-Type": {mimeType},
|
"Content-Type": {mimeType},
|
||||||
"Content-Disposition": {disposition},
|
"Content-Disposition": {disposition},
|
||||||
|
"Content-Transfer-Encoding": {"base64"},
|
||||||
},
|
},
|
||||||
Disposition: disposition,
|
Disposition: disposition,
|
||||||
KeyPackets: base64.StdEncoding.EncodeToString(enc.GetBinaryKeyPacket()),
|
KeyPackets: base64.StdEncoding.EncodeToString(enc.GetBinaryKeyPacket()),
|
||||||
|
|||||||
@ -382,6 +382,8 @@ func getAttachmentPartHeader(att *pmapi.Attachment) message.Header {
|
|||||||
// Use base64 for all attachments except embedded RFC822 messages.
|
// Use base64 for all attachments except embedded RFC822 messages.
|
||||||
if att.MIMEType != "message/rfc822" {
|
if att.MIMEType != "message/rfc822" {
|
||||||
hdr.Set("Content-Transfer-Encoding", "base64")
|
hdr.Set("Content-Transfer-Encoding", "base64")
|
||||||
|
} else {
|
||||||
|
hdr.Del("Content-Transfer-Encoding")
|
||||||
}
|
}
|
||||||
|
|
||||||
return hdr
|
return hdr
|
||||||
|
|||||||
Reference in New Issue
Block a user