brief-umbrella-80783
04/17/2026, 1:26 PMastonishing-engineer-93454
04/17/2026, 9:20 PMAccept-Encoding header is to rely on the HTTP client’s automatic compression handling rather than hardcoding it in the SDK.
In the source...
• L*ine 53*: default client is created
private val client: OkHttpClient = OkHttpClient(),
• Line 91: the request is executed
client.newCall(getRequest).enqueue(...)
Line 91 is where OkHttp would handle it automatically.brief-umbrella-80783
04/18/2026, 5:11 AMpowerful-spoon-16837
04/20/2026, 7:20 AMAccept-Encoding header was removed from the NetworkDispatcherOkHttp dispatcher because OkHttp adds it automatically and handles decompression transparently. When the header was set manually, OkHttp disabled its automatic decompression and passed raw compressed bytes to the callback. And it led to a crash.
For the NetworkDispatcherKtor, we created a PR that adds the ContentEncoding plugin, which handles both adding the header and decompressing responses automatically.