flush_v3 #188

Merged
vtolstov merged 6 commits from kgorbunov/micro-server-http:flush_v3 into v3 2024-03-26 14:52:34 +03:00
Showing only changes of commit 39977d5140 - Show all commits

View File

@ -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 {
if md, ok := metadata.FromOutgoingContext(ctx); gzipAccepted(md) && ok {
md.Set(contentEncodingHeader, "gzip")
ctx = metadata.NewIncomingContext(ctx, md)
gz := gzipPool.Get().(*gzip.Writer)
defer gzipPool.Put(gz)