summaryrefslogtreecommitdiffstats
path: root/modules/public/public.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/public/public.go')
-rw-r--r--modules/public/public.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/public/public.go b/modules/public/public.go
index 7804e945e7..ac1d80c860 100644
--- a/modules/public/public.go
+++ b/modules/public/public.go
@@ -11,6 +11,7 @@ import (
"path/filepath"
"strings"
+ "code.gitea.io/gitea/modules/container"
"code.gitea.io/gitea/modules/httpcache"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
@@ -83,11 +84,11 @@ func AssetsHandlerFunc(opts *Options) http.HandlerFunc {
}
// parseAcceptEncoding parse Accept-Encoding: deflate, gzip;q=1.0, *;q=0.5 as compress methods
-func parseAcceptEncoding(val string) map[string]bool {
+func parseAcceptEncoding(val string) container.Set[string] {
parts := strings.Split(val, ";")
- types := make(map[string]bool)
+ types := make(container.Set[string])
for _, v := range strings.Split(parts[0], ",") {
- types[strings.TrimSpace(v)] = true
+ types.Add(strings.TrimSpace(v))
}
return types
}