Skip to content

Commit

Permalink
Fix extension checking to be case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Oct 17, 2023
1 parent 32fa0d7 commit 057235a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func setContentType(r *http.Request, resp *http.Response) {
return
}

rext := filepath.Ext(resp.Header.Get("ZIPSVR_FILENAME"))
ext := filepath.Ext(r.URL.Path)
rext := strings.ToLower(filepath.Ext(resp.Header.Get("ZIPSVR_FILENAME")))
ext := strings.ToLower(filepath.Ext(r.URL.Path))
mime := ""

// If the request already has an extension, fetch the mime via extension
Expand Down

0 comments on commit 057235a

Please sign in to comment.