1
0
mirror of https://github.com/golang/go synced 2024-11-06 03:26:15 -07:00
go/src/mime
Alexey Neganov b9f6b22a01 mime: handling invalid mime media parameters
Sometimes it's necessary to deal with emails that do not follow the specification; in particular, it's possible to download such email via gmail.
When the existing implementation handle invalid mime media parameters, it returns nils and error, although there is a valid media type, which may be returned.
If this behavior changes, it may not affect any existing programs, but it will help to parse some emails.

Fixes #19498

Change-Id: Ieb2fdbddfd93857faee941d2aa49d59e286d57fd
Reviewed-on: https://go-review.googlesource.com/38190
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-03-17 13:59:31 +00:00
..
multipart mime/multipart: allow boundary len <= 70 2017-02-01 21:06:49 +00:00
quotedprintable mime/quotedprintable: accept = not followed by 2 hex digits as literal equals 2016-10-28 16:08:06 +00:00
testdata
encodedword_test.go mime: fix panic parsing 'encoded-word', be stricter 2017-03-07 17:38:24 +00:00
encodedword.go mime: fix panic parsing 'encoded-word', be stricter 2017-03-07 17:38:24 +00:00
example_test.go
grammar.go
mediatype_test.go mime: handling invalid mime media parameters 2017-03-17 13:59:31 +00:00
mediatype.go mime: handling invalid mime media parameters 2017-03-17 13:59:31 +00:00
type_dragonfly.go
type_freebsd.go
type_openbsd.go
type_plan9.go mime: fix mime type file name on Plan 9 2016-05-15 19:56:08 +00:00
type_test.go mime: add benchmarks for TypeByExtension and ExtensionsByType 2017-02-14 23:02:07 +00:00
type_unix.go
type_windows.go
type.go