Skip to content

Commit e48e15e

Browse files
mercataemersion
authored andcommitted
imapserver: drop SP between body entries in body-type-mpart
This breaks Outlook for iOS. The new behavior follows Dovecot and the RFC ABNF.
1 parent d72bdf6 commit e48e15e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

imapserver/fetch.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,9 @@ func writeBodyTypeMpart(enc *imapwire.Encoder, bs *imap.BodyStructureMultiPart,
650650
if len(bs.Children) == 0 {
651651
panic("imapserver: imap.BodyStructureMultiPart must have at least one child")
652652
}
653-
for i, child := range bs.Children {
654-
if i > 0 {
655-
enc.SP()
656-
}
653+
for _, child := range bs.Children {
654+
// ABNF for body-type-mpart doesn't have SP between body entries, and
655+
// Outlook for iOS chokes on SP
657656
writeBodyStructure(enc, child, extended)
658657
}
659658

0 commit comments

Comments
 (0)