]> Cypherpunks repositories - gostls13.git/commit
net/mail: enhance address parser to include support for domain literals
authorNuno Gonçalves <nunomrgoncalves@tecnico.ulisboa.pt>
Mon, 18 Mar 2024 20:06:17 +0000 (20:06 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 19 Mar 2024 11:31:03 +0000 (11:31 +0000)
commitd14cf8f91b1b9ab5009737b03e6e23cc201cbc22
treef4a7ecf0dbad1b6b025684148b5386c484775de4
parent3e82b5ee0aa122f1cc8427820945f21d9bfefbcb
net/mail: enhance address parser to include support for domain literals

The existing implementation of the mail package conforms to RFC 5322
for parsing mail messages, but it lacks support for domain literals. This
patch addresses this limitation by adding support for domain literals in
the address parser.

The Addr-Spec Specification, defined in RFC 5322 Section 3.4.1,
outlines the format for email addresses:
https://datatracker.ietf.org/doc/html/rfc5322\#section-3.4.1

Fixes #60206

Change-Id: Ic901418325bd1da69e70800d70b87d658b953738
GitHub-Last-Rev: bdda66f3fe098df3a62d803b1f69e63fef6281e3
GitHub-Pull-Request: golang/go#66075
Reviewed-on: https://go-review.googlesource.com/c/go/+/567777
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/net/mail/message.go
src/net/mail/message_test.go