Sometimes empty bodies can be received together with a Content-Encoding of, for example, "gzip". I've come across this a few times working with external API:s which send a 304 (Do not modify), together with a empty body and Content-Encoding "Gzip".
With these changes, Faraday won't raise an unknown gzip format exception, but rather just not try to decompress the body.
Sometimes empty bodies can be received together with a Content-Encoding of, for example, "gzip". I've come across this a few times working with external API:s which send a 304 (Do not modify), together with a empty body and Content-Encoding "Gzip".
With these changes, Faraday won't raise an unknown gzip format exception, but rather just not try to decompress the body.
Example of similar fix in okhttp: https://github.com/square/okhttp/issues/268