Skip to content

Commit a7b42e6

Browse files
committed
Fix case sensitive comparison
1 parent 1d76b09 commit a7b42e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/repo/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func ServeData(ctx *context.Context, name string, size int64, reader io.Reader)
6262
} else {
6363
ctx.Resp.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, name))
6464
ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition")
65-
if filepath.Ext(name) == ".apk" && base.IsZipFile(buf) {
65+
if strings.EqualFold(".apk", filepath.Ext(name)) && base.IsZipFile(buf) {
6666
ctx.Resp.Header().Set("Content-Type", "application/vnd.android.package-archive")
6767
}
6868
}

0 commit comments

Comments
 (0)