From: Brad Fitzpatrick Date: Wed, 17 Apr 2013 20:25:28 +0000 (-0700) Subject: doc/go1.1.html, mime/multipart: document quoted-printable decoding X-Git-Tag: go1.1rc2~85 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=32f2fd15dfdc28e2ff22a2b25831abd4c81987c0;p=gostls13.git doc/go1.1.html, mime/multipart: document quoted-printable decoding Fixes #5293 R=golang-dev, r CC=golang-dev https://golang.org/cl/8840043 --- 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