Skip to content

Commit

Permalink
Space trim for ext
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Oct 17, 2023
1 parent 057235a commit 580323b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func setContentType(r *http.Request, resp *http.Response) {
}

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

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

0 comments on commit 580323b

Please sign in to comment.