Skip to content

Commit 057235a

Browse files
committed
Fix extension checking to be case insensitive
1 parent 32fa0d7 commit 057235a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ func setContentType(r *http.Request, resp *http.Response) {
131131
return
132132
}
133133

134-
rext := filepath.Ext(resp.Header.Get("ZIPSVR_FILENAME"))
135-
ext := filepath.Ext(r.URL.Path)
134+
rext := strings.ToLower(filepath.Ext(resp.Header.Get("ZIPSVR_FILENAME")))
135+
ext := strings.ToLower(filepath.Ext(r.URL.Path))
136136
mime := ""
137137

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

0 commit comments

Comments
 (0)