add todo's about mime header parameter decoding

not sure what the correct approach is, would need to analyze email archive for practices.
This commit is contained in:
Mechiel Lukkien
2023-09-21 14:51:47 +02:00
parent f87f286b80
commit 79774c15ec
4 changed files with 4 additions and 2 deletions

View File

@ -212,6 +212,7 @@ func parsedMessage(log *mlog.Log, m store.Message, state *msgState, full, msgite
disp, params, err := mime.ParseMediaType(cp)
log.Check(err, "parsing content-disposition", mlog.Field("cp", cp))
if strings.EqualFold(disp, "attachment") {
// todo: should we be decoding these names? i've seen messages with regular q-word style mime-encoding, not the one specified in ../rfc/2231:210
name := p.ContentTypeParams["name"]
if name == "" {
name = params["filename"]