fix(GODT-1804): Only promote content headers if non-empty

When attaching public key, we take the root mime part, create a new root,
and put the old root alongside an additional public key mime part.
But when moving the root, we would copy all content headers, even empty ones.
So we’d be left with Content-Disposition: "" which would fail to parse.
This commit is contained in:
James Houlahan
2023-02-03 11:47:04 +01:00
parent 8894a982f2
commit d82b71de89
6 changed files with 213 additions and 7 deletions

2
go.mod
View File

@ -7,7 +7,7 @@ require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/ProtonMail/gluon v0.14.2-0.20230202124956-4fa6b6a0b9b5
github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a
github.com/ProtonMail/go-proton-api v0.3.1-0.20230202061850-e2fc4deffe20
github.com/ProtonMail/go-proton-api v0.3.1-0.20230203120457-1849bf7d578b
github.com/ProtonMail/go-rfc5322 v0.11.0
github.com/ProtonMail/gopenpgp/v2 v2.4.10
github.com/PuerkitoBio/goquery v1.8.0