change set md
This commit is contained in:
parent
11e565ce55
commit
364077e72d
@ -89,9 +89,8 @@ func (h *Handler) Metrics(ctx context.Context, req *codecpb.Frame, rsp *codecpb.
|
||||
|
||||
w := io.Writer(buf)
|
||||
|
||||
if md, ok := metadata.FromIncomingContext(ctx); gzipAccepted(md) && ok {
|
||||
md.Set(contentEncodingHeader, "gzip")
|
||||
ctx = metadata.NewOutgoingContext(ctx, md)
|
||||
if md, ok := metadata.FromOutgoingContext(ctx); gzipAccepted(md) && ok {
|
||||
md.Set(contentEncodingHeader, "gzip"))
|
||||
gz := gzipPool.Get().(*gzip.Writer)
|
||||
defer gzipPool.Put(gz)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user