imports: don't set empty Content-Type header field

This commit is contained in:
Simon Ser 2020-06-11 11:04:05 +02:00
parent 0b790847d9
commit 346a0443db
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ func ImportMessage(c *protonmail.Client, r io.Reader) error {
} }
if _, ok := p.Header.(*mail.InlineHeader); ok { if _, ok := p.Header.(*mail.InlineHeader); ok {
hdr.Set("Content-Type", p.Header.Get("Content-Type")) if t := p.Header.Get("Content-Type"); t != "" {
hdr.Set("Content-Type", t)
}
body = p.Body body = p.Body
break break
} }