]> Cypherpunks repositories - gostls13.git/commit
mime: fix ExtensionsByType bug when there are duplicates
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 14 Jan 2020 18:15:25 +0000 (18:15 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 25 Feb 2020 21:09:55 +0000 (21:09 +0000)
commitf0ee49b5bcde39ac6c36d3837666aa9a36383066
treec4707e70d619a4455ec4505582ecd3514719b724
parent46f9aea80197bfdf4c024c3f5a71be51a2facf59
mime: fix ExtensionsByType bug when there are duplicates

Also, sort them so the results aren't random.

Thanks to @junedev for the bug report & repro.

Fixes #36524

Change-Id: Ic9197ebeceddfb3d0aee895d8fc12ce4d205b164
Reviewed-on: https://go-review.googlesource.com/c/go/+/214680
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/type.go
src/mime/type_test.go