go http client transport set DisableCompression is true, then my client cant reuse socket

234 views Asked by At

client transport is http.Transport{DisableKeepAlives: false, DisableCompression: true} http server normal, and keepalive is starting. in this case, cant reuse socket, every request will create new socket.

First. server use router.Use(gzip.Gzip(gzip.DefaultCompression, gzip.WithDecompressFn(gzip.DefaultDecompressHandle))), and client dont set DisableCompression every thing is normal. link can reuse. After I want close compression, I set DisableCompression is True. Then can't reuse link. Delete server gzip, it did not effect.

0

There are 0 answers