'go http client transport set DisableCompression is true, then my client cant reuse socket
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
