Archived
1
0

srnd: fix multipart message parsing

This commit is contained in:
cathugger 2018-12-08 20:59:46 +00:00
parent 1517941b29
commit b5ff2dc4a2
No known key found for this signature in database
GPG Key ID: 9BADDA2DAF6F01A8

View File

@ -632,7 +632,7 @@ func read_message_body(body io.Reader, hdr map[string][]string, store ArticleSto
body = io.TeeReader(body, wr) body = io.TeeReader(body, wr)
} }
boundary, ok := params["boundary"] boundary, ok := params["boundary"]
if content_type == "multipart/mixed" && ok { if strings.HasPrefix(media_type, "multipart/") && ok {
partReader := multipart.NewReader(body, boundary) partReader := multipart.NewReader(body, boundary)
for { for {
part, err := partReader.NextPart() part, err := partReader.NextPart()