fixup gzip handling
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
		| @@ -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. | // gzipAccepted returns whether the client will accept gzip-encoded content. | ||||||
| func gzipAccepted(md metadata.Metadata) bool { | func gzipAccepted(md metadata.Metadata) bool { | ||||||
| 	a, ok := md.Get(acceptEncodingHeader) | 	a := md.GetJoined(acceptEncodingHeader) | ||||||
| 	if !ok { |  | ||||||
| 		return false |  | ||||||
| 	} |  | ||||||
| 	for i := range a { |  | ||||||
| 		if strings.Contains(a[i], "gzip") { |  | ||||||
| 			return true |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	return false | 	return strings.Contains(a, "gzip") | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user