diff options
| author | MathiasB <git@denbeke.be> | 2015-04-10 12:14:16 +0200 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-07-22 20:36:46 +0000 |
| commit | daaa45073e887cb6d8075c2caafdfe8425bca25a (patch) | |
| tree | 04e26ddf5671cf0438753468d52b6a69c4453e92 /src/os/exec/exec.go | |
| parent | 5201bf7ad184cac07466016a78b80aed5e472be4 (diff) | |
| download | go-daaa45073e887cb6d8075c2caafdfe8425bca25a.tar.xz | |
net/mail: enhanced Address.String and ParseAddress to match RFC 5322
Updated Address.String so it restores quoted local parts, which wasn't
done before.
When parsing `<" "@example.com>`, the formatted string returned
`< @example>`, which doens't match RFC 5322, since a space is not atext.
Another example is `<"bob@valid"@example.com>` which returned
`<bob@valid@example.com>`, which is completely invalid.
I also added support for quotes and backslashes in a quoted local part.
Besides formatting a parsed Address, the ParseAddress function also
needed more testing and finetuning for special cases.
Things like `<.john.doe@example.com>` and `<john..doe@example.com>`
e.a. were accepted, but are invalid.
I fixed those details and add tests for some other special cases.
Fixes #10768
Change-Id: Ib0caf8ad603eb21e32fcb957a5f1a0fe5d1c6e6e
Reviewed-on: https://go-review.googlesource.com/8724
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/os/exec/exec.go')
0 files changed, 0 insertions, 0 deletions
