From 32f2fd15dfdc28e2ff22a2b25831abd4c81987c0 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 17 Apr 2013 13:25:28 -0700 Subject: [PATCH] doc/go1.1.html, mime/multipart: document quoted-printable decoding Fixes #5293 R=golang-dev, r CC=golang-dev https://golang.org/cl/8840043 --- doc/go1.1.html | 3 +++ src/pkg/mime/multipart/multipart.go | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/go1.1.html b/doc/go1.1.html index 2900243b85..03a457dc58 100644 --- a/doc/go1.1.html +++ b/doc/go1.1.html @@ -862,6 +862,9 @@ has a new method for its Writer, SetBoundary, to define the boundary separator used to package the output. +The Reader also now +transparently decodes any quoted-printable parts and removes +the Content-Transfer-Encoding header when doing so.
  • diff --git a/src/pkg/mime/multipart/multipart.go b/src/pkg/mime/multipart/multipart.go index a6204d7bdb..2c862a6479 100644 --- a/src/pkg/mime/multipart/multipart.go +++ b/src/pkg/mime/multipart/multipart.go @@ -28,7 +28,12 @@ var emptyParams = make(map[string]string) type Part struct { // The headers of the body, if any, with the keys canonicalized // in the same fashion that the Go http.Request headers are. - // i.e. "foo-bar" changes case to "Foo-Bar" + // For example, "foo-bar" changes case to "Foo-Bar" + // + // As a special case, if the "Content-Transfer-Encoding" header + // has a value of "quoted-printable", that header is instead + // hidden from this map and the body is transparently decoded + // during Read calls. Header textproto.MIMEHeader buffer *bytes.Buffer -- 2.48.1