handler.go | 2 +- diff --git a/handler.go b/handler.go index 0cfb5cff43694208de1f0f86a5327a1bec517e09151266527d7edfd14efe42b9..56e24cbcb708a64d642269f9903e6ad999c811139d4d668466df8c491caf04e7 100644 --- a/handler.go +++ b/handler.go @@ -307,7 +307,7 @@ if contentType == "" { contentType = mediaType(path.Base(pth), cfg.MIMEs) } - contentTypeBase := strings.SplitN(contentType, ";", 2)[0] + contentTypeBase, _, _ := strings.Cut(contentType, ";") w.Header().Set("Content-Type", contentType) if etag != "" {