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
In general it cannot safely skip malformed headers, since the malformation may affect the parsing of subsequent lines.
This is also consistent with the other go standard library functions that return on first error.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
See example: https://go.dev/play/p/OLfq5WlWCMf (with a fake UTF colon)
What did you expect to see?
I expect that
textproto.ReadMIMEHeader
will return parsed headers, skip failed headers and return an error if any along with parsed headers:What did you see instead?
I see only first parsed header:
Date:[Mon, 23 Jun 2015 11:40:36 -0400]
Further headers are not parsed.
See also: #53854
The text was updated successfully, but these errors were encountered: