]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.1.html, mime/multipart: document quoted-printable decoding
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 17 Apr 2013 20:25:28 +0000 (13:25 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 17 Apr 2013 20:25:28 +0000 (13:25 -0700)
Fixes #5293

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8840043

doc/go1.1.html
src/pkg/mime/multipart/multipart.go

index 2900243b85b8f0f6706f74a0580ca0414377fe0c..03a457dc586fb809baab7ffe51cf2ccacf0b355b 100644 (file)
@@ -862,6 +862,9 @@ has a new method for its
 <a href="/pkg/mime/multipart/#Writer"><code>Writer</code></a>,
 <a href="/pkg/mime/multipart/#Writer.SetBoundary"><code>SetBoundary</code></a>,
 to define the boundary separator used to package the output.
+The <a href="/pkg/mime/multipart/#Reader"><code>Reader</code></a> also now
+transparently decodes any <code>quoted-printable</code> parts and removes
+the <code>Content-Transfer-Encoding</code> header when doing so.
 </li>
 
 <li>
index a6204d7bdbcfbf34197e8021e05c474a18c272a7..2c862a647910e90f9ef3e3c847fc454a62d19595 100644 (file)
@@ -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