Skip to content

Commit 580323b

Browse files
committed
Space trim for ext
1 parent 057235a commit 580323b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func setContentType(r *http.Request, resp *http.Response) {
132132
}
133133

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

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

0 commit comments

Comments
 (0)