Skip to content

Commit

Permalink
go 1.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbrown committed Jun 22, 2018
1 parent 0056c7a commit 67342bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imageproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ func (p *Proxy) allowed(r *Request) error {
// allowedContentType returns an allowed content type string to use in responses or "" if the
// content type cannot be used.
func (p *Proxy) allowedContentType(contentType string) string {
mediaType, _, err := mime.ParseMediaType(contentType)
if err != nil && err != mime.ErrInvalidMediaParameter {
mediaType, _, _ := mime.ParseMediaType(contentType)
if mediaType == "" {
return ""
}

Expand Down

0 comments on commit 67342bf

Please sign in to comment.