Improve minifier MIME type resolution

This commit also removes the deprecated `Suffix` from MediaType. Now use `Suffixes` and put the MIME type suffix in the type, e.g. `application/svg+xml`.

Fixes #5093
This commit is contained in:
Bjørn Erik Pedersen
2018-08-28 14:18:12 +02:00
parent 6b9934a266
commit ebb56e8bdb
8 changed files with 87 additions and 106 deletions

View File

@@ -93,11 +93,9 @@ func TestGetFormatByExt(t *testing.T) {
func TestGetFormatByFilename(t *testing.T) {
noExtNoDelimMediaType := media.TextType
noExtNoDelimMediaType.OldSuffix = ""
noExtNoDelimMediaType.Delimiter = ""
noExtMediaType := media.TextType
noExtMediaType.OldSuffix = ""
var (
noExtDelimFormat = Format{