1
0
mirror of https://github.com/golang/go synced 2024-10-05 02:31:21 -06:00
go/src/pkg/mime/multipart
Brad Fitzpatrick 24555c7b8c mime/multipart: don't strip leading space/tab in quoted-printable decoding
Late bug fix, but this is arguably a regression from Go 1.0,
since we added this transparent decoding since then. Without
this fix, Go 1.0 users could decode this correctly, but Go 1.1
users would not be able to.

The newly added test is from the RFC itself.

The updated tests had the wrong "want" values before. They
were there to test \r\n vs \n equivalence (which is
unchanged), not leading whitespace.

The skipWhite decoder struct field was added in the battles of
Issue 4771 in revision b3bb265bfecf. It was just a wrong
strategy, from an earlier round of attempts in
https://golang.org/cl/7300092/

Update #4771
Fixes #5295

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8536045
2013-04-17 20:04:58 -07:00
..
testdata all: remove exec bit on files 2013-01-18 02:41:17 +08:00
formdata_test.go mime/multipart: allow for temp files to be removed after tests are finished on Windows 2011-06-11 16:23:44 +10:00
formdata.go bytes,strings: make *Reader implement io.ReaderAt 2012-02-15 12:58:00 +11:00
multipart_test.go mime/multipart: transparently decode quoted-printable transfer encoding 2012-11-19 19:50:19 -08:00
multipart.go doc/go1.1.html, mime/multipart: document quoted-printable decoding 2013-04-17 13:25:28 -07:00
quotedprintable_test.go mime/multipart: don't strip leading space/tab in quoted-printable decoding 2013-04-17 20:04:58 -07:00
quotedprintable.go mime/multipart: don't strip leading space/tab in quoted-printable decoding 2013-04-17 20:04:58 -07:00
writer_test.go mime/multipart: allow setting the Writer boundary 2012-12-10 16:30:42 -05:00
writer.go mime/multipart: allow setting the Writer boundary 2012-12-10 16:30:42 -05:00