]> Cypherpunks repositories - gostls13.git/commit
net/mail: improve detection of charset errors
authorRuss Cox <rsc@golang.org>
Wed, 13 Jan 2021 15:53:48 +0000 (10:53 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 25 Mar 2022 19:04:59 +0000 (19:04 +0000)
commit2bbf383774952c8ddc309a45c024af76b47ea1fe
tree487cbb9b55efa5fe2b0ee9cf1cd8a67dc832a836
parentf25631b490c7ccb8e555b4031dc12046b2534c11
net/mail: improve detection of charset errors

The detection of the "unknown charset" case was too tailored
to one specific address parser. Make it generalize, so that custom
address parsers behave the same way as the default one
for character sets they do not handle.

Fixes #41625.

Change-Id: I347d4bb6844d0a1f23e908b776d21e8be5af3874
Reviewed-on: https://go-review.googlesource.com/c/go/+/283632
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/mail/message.go
src/net/mail/message_test.go