1
0
mirror of https://github.com/golang/go synced 2024-09-30 12:18:33 -06:00
go/src/mime
thinkofher 1e7e160d07 mime/multipart: use %w when wrapping error in NextPart
Use "%w" instead of "%v" as format verb for error value in the NextPart
method. This way it will be possible to use common go error utilities
from std library when parsing from custom io.Readers.

This issue was discovered during attempts to use
http.Request.ParseMultipartForm together with http.MaxBytesHandler.

Change-Id: Idb82510fb536b66b51ed1d943737c4828f07c2f2
GitHub-Last-Rev: 8bc49c945c
GitHub-Pull-Request: golang/go#55133
Reviewed-on: https://go-review.googlesource.com/c/go/+/431675
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
2022-09-20 02:11:38 +00:00
..
multipart mime/multipart: use %w when wrapping error in NextPart 2022-09-20 02:11:38 +00:00
quotedprintable mime: use strings.Builder 2022-09-06 17:36:47 +00:00
testdata mime: skip globs2 entries that are not simple file extensions 2022-05-13 21:01:01 +00:00
encodedword_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
encodedword.go all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
example_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
grammar.go
mediatype_test.go mime: allow duplicate media type parameters with equivalent values 2022-08-26 17:58:37 +00:00
mediatype.go mime: allow duplicate media type parameters with equivalent values 2022-08-26 17:58:37 +00:00
type_dragonfly.go
type_freebsd.go
type_openbsd.go
type_plan9.go
type_test.go mime: remove test ordering dependency 2022-08-08 21:09:03 +00:00
type_unix_test.go mime: remove test ordering dependency 2022-08-08 21:09:03 +00:00
type_unix.go mime: skip globs2 entries that are not simple file extensions 2022-05-13 21:01:01 +00:00
type_windows.go mime: ignore .js => text/plain in Windows registry 2022-05-28 20:07:28 +00:00
type.go all: gofmt main repo 2022-04-11 16:34:30 +00:00