You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When retrieving a resource via http2, fhttp library always decompresses the body, even if DisableCompression is set to true. According to the option description this should not happen:
// DisableCompression, if true, prevents the Transport from
// requesting compression with an "Accept-Encoding: gzip"
// request header when the Request contains no existing
// Accept-Encoding value. If the Transport requests gzip on
// its own and gets a gzipped response, it's transparently
// decoded in the Response.Body. However, if the user
// explicitly requested gzip it is not automatically
// uncompressed.
@jsnjack thank you for supplying the fix for that.
will include that in the next release and i think about adding an option to the tlsclient itself to be able to set DisableCompression to either true or false.
When retrieving a resource via http2, fhttp library always decompresses the body, even if DisableCompression is set to true. According to the option description this should not happen:
I looked into parts which read body in http1 and http2 and compared them. http1 has
addedGzip
flag which is checked before callingDecompressBody
function (https://github.com/bogdanfinn/fhttp/blob/959a7f72d1ca6d6319e1ed82a26eea431658d3b3/transport.go#L2190). In http2 we haverequestedGzip
flag, which acts in similar way. However,requestedGzip
is not checked (https://github.com/bogdanfinn/fhttp/blob/master/http2/transport.go#L2259).The following change seem to solve the issue bogdanfinn/fhttp@8237b3b
The text was updated successfully, but these errors were encountered: