1
0
mirror of https://github.com/golang/go synced 2024-11-19 06:54:39 -07:00
go/src/mime
Brad Fitzpatrick ff555f1159 mime/multipart: don't call Read on io.Reader after an error is seen
The io.Reader contract makes no promises about how a Reader should
behave after it returns its first error. Usually the errors are
sticky, but they don't have to be. A regression in zlib.Reader (bug
accidentally relied on sticky errors.

Minimal fix: wrap the user's provided Reader in a Reader which
guarantees stickiness. The minimal fix is less scary than touching
the multipart state machine.

Fixes #14676

Change-Id: I8dd8814b13ae5530824ae0e68529f788974264a5
Reviewed-on: https://go-review.googlesource.com/20297
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-07 19:50:16 +00:00
..
multipart mime/multipart: don't call Read on io.Reader after an error is seen 2016-03-07 19:50:16 +00:00
quotedprintable
testdata
encodedword_test.go mime: Fix BenchmarkQDecodeHeader to call DecodeHeader 2016-02-28 17:24:01 +00:00
encodedword.go all: fix typos 2016-02-23 13:58:47 +00:00
example_test.go mime: move examples to external test file 2015-08-22 18:39:29 +00:00
grammar.go all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
mediatype_test.go mime: fix parsing of empty string attribute value 2015-12-05 20:14:25 +00:00
mediatype.go all: single space after period. 2016-03-02 00:13:47 +00:00
type_dragonfly.go
type_freebsd.go
type_openbsd.go
type_plan9.go
type_test.go
type_unix.go
type_windows.go
type.go