]> Cypherpunks repositories - gostls13.git/commit
mime: handling invalid mime media parameters
authorAlexey Neganov <neganovalexey@gmail.com>
Tue, 14 Mar 2017 18:11:42 +0000 (21:11 +0300)
committerIan Lance Taylor <iant@golang.org>
Fri, 17 Mar 2017 13:59:31 +0000 (13:59 +0000)
commitb9f6b22a0100716db1f196a395f9ded8456337f8
treeb80b65850c6ddcd42923adc2daa8b32eb8a7cec1
parentb6cd22c277f49df493e3033430c32e56ecb949e3
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>
src/mime/mediatype.go
src/mime/mediatype_test.go