We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf3f8f0 commit 1b573c2Copy full SHA for 1b573c2
src/mime/type_unix.go
@@ -43,7 +43,9 @@ func loadMimeGlobsFile(filename string) error {
43
for scanner.Scan() {
44
// Each line should be of format: weight:mimetype:*.ext
45
fields := strings.Split(scanner.Text(), ":")
46
- if len(fields) < 2 || fields[0][0] == '#' || fields[2][0] != '*' {
+ if len(fields) < 3 || len(fields[0]) < 1 || len(fields[2]) < 2 {
47
+ continue
48
+ } else if fields[0][0] == '#' || fields[2][0] != '*' {
49
continue
50
}
51
0 commit comments