Closed neganovalexey closed 7 years ago
Can you edit your message so that it includes the proposed API change (instead of putting the change in an attachment)?
OK
@bradfitz says yes. We will need to document the new behavior; unclear we need the new error variable. I'd leave that out.
CL welcome.
CL https://golang.org/cl/38190 mentions this issue.
Sometimes it's necessary to deal with emails that do not follow the specification; in particular, it's possible to download such email via gmail. When Golang standard library handle invalid mime media parameters, it returns nils and error, although there is a valid media type, which may be returned. If this behavior changes, it may not affect any existing programs, but it will help to parse some emails.
I suggest to change file src/mime/mediatype.go as follows: