What version of Go are you using (go version)?
$ go version
go version go1.18.3 linux/amd64
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:
Read headers: map[Date:[Mon, 23 Jun 2015 11:40:36 -0400] Subject:[Gophers at Gophercon] To:[Another Gopher <to@example.com>]]
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
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.ReadMIMEHeaderwill 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