mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 22:14:40 +03:00
message: when parsing a message, don't treat absent header and empty header value the same
We now use "*string" for such header fields, for Content-* fields, as used in the imapserver when responding to FETCH commands. We'll now return NIL for an absent header, and "" (empty string) if the header value is empty.
This commit is contained in:
@ -929,10 +929,14 @@ func PartStructure(log mlog.Log, p *message.Part) (webhook.Structure, error) {
|
||||
} else if err != nil {
|
||||
return webhook.Structure{}, err
|
||||
}
|
||||
var cid string
|
||||
if p.ContentID != nil {
|
||||
cid = *p.ContentID
|
||||
}
|
||||
s := webhook.Structure{
|
||||
ContentType: strings.ToLower(p.MediaType + "/" + p.MediaSubType),
|
||||
ContentTypeParams: p.ContentTypeParams,
|
||||
ContentID: p.ContentID,
|
||||
ContentID: cid,
|
||||
ContentDisposition: strings.ToLower(disp),
|
||||
Filename: filename,
|
||||
DecodedSize: p.DecodedSize,
|
||||
|
Reference in New Issue
Block a user