]> Cypherpunks repositories - gostls13.git/commit
mime/multipart: don't strip leading space/tab in quoted-printable decoding
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 18 Apr 2013 03:04:58 +0000 (20:04 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 18 Apr 2013 03:04:58 +0000 (20:04 -0700)
commit24555c7b8cfc11f47b0df7ab2add827c64ba3d19
tree63dee8c6dd5e9eae96578b0e7167d2570bfe0264
parent67e26fceb577241a5b017d97be27bbc3dd466106
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
src/pkg/mime/multipart/quotedprintable.go
src/pkg/mime/multipart/quotedprintable_test.go