mirror of
https://github.com/willnorris/imageproxy.git
synced 2024-12-16 21:56:43 -05:00
use path package for matching content type
content type always uses forward slash, so path is the right package to use. fixes #191
This commit is contained in:
parent
c0a97f6742
commit
d99be34251
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ import (
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path/filepath"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ func contentTypeMatches(patterns []string, contentType string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, pattern := range patterns {
|
for _, pattern := range patterns {
|
||||||
if ok, err := filepath.Match(pattern, contentType); ok && err == nil {
|
if ok, err := path.Match(pattern, contentType); ok && err == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue