Compare commits

..

1 Commits

Author SHA1 Message Date
8c745c3f74 fixup gzip handling
All checks were successful
coverage / build (push) Successful in 1m50s
test / test (push) Successful in 2m49s
sync / sync (push) Successful in 55s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-04-29 15:11:20 +03:00

View File

@@ -121,15 +121,7 @@ func (h *Handler) Metrics(ctx context.Context, req *codecpb.Frame, rsp *codecpb.
// gzipAccepted returns whether the client will accept gzip-encoded content.
func gzipAccepted(md metadata.Metadata) bool {
a, ok := md.Get(acceptEncodingHeader)
if !ok {
return false
}
for i := range a {
if strings.Contains(a[i], "gzip") {
return true
}
}
a := md.GetJoined(acceptEncodingHeader)
return false
return strings.Contains(a, "gzip")
}