You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: The Writer.CreatePart func in mime/multipart doesn't sort before writing headers.
Proposed solution is to obviously sort them and write them in the sorted order, allowing things like unit tests to accurately check if the resulting document is valid.
97// TODO(bradfitz): move this to textproto.MimeHeader.Write(w), have it sort98// and clean, like http.Header.Write(w) does.99fork, vv:=rangeheader {
100for_, v:=rangevv {
101fmt.Fprintf(&b, "%s: %s\r\n", k, v)
102 }
103 }
I'm happy to create the patch to fix this, but I understand the stdlib is not accepting changes, I could implement the sort in mime/multipart if required.
Problem: The
Writer.CreatePart
func inmime/multipart
doesn't sort before writing headers.Proposed solution is to obviously sort them and write them in the sorted order, allowing things like unit tests to accurately check if the resulting document is valid.
This is clearly a known issue as the source code has a comment stating this (https://golang.org/src/mime/multipart/writer.go#L97)
cc: @bradfitz
The text was updated successfully, but these errors were encountered: