diff --git a/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/NetworkHelper.kt b/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/NetworkHelper.kt index 24770bbd6..885a11108 100644 --- a/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/NetworkHelper.kt +++ b/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/NetworkHelper.kt @@ -2,12 +2,10 @@ package eu.kanade.tachiyomi.network import android.content.Context import eu.kanade.tachiyomi.network.interceptor.CloudflareInterceptor -import eu.kanade.tachiyomi.network.interceptor.IgnoreGzipInterceptor import eu.kanade.tachiyomi.network.interceptor.UncaughtExceptionInterceptor import eu.kanade.tachiyomi.network.interceptor.UserAgentInterceptor import okhttp3.Cache import okhttp3.OkHttpClient -import okhttp3.brotli.BrotliInterceptor import okhttp3.logging.HttpLoggingInterceptor import java.io.File import java.util.concurrent.TimeUnit @@ -33,8 +31,6 @@ class NetworkHelper( ) .addInterceptor(UncaughtExceptionInterceptor()) .addInterceptor(UserAgentInterceptor(::defaultUserAgentProvider)) - .addNetworkInterceptor(IgnoreGzipInterceptor()) - .addNetworkInterceptor(BrotliInterceptor) if (preferences.verboseLogging.get()) { val httpLoggingInterceptor = HttpLoggingInterceptor().apply { diff --git a/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/IgnoreGzipInterceptor.kt b/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/IgnoreGzipInterceptor.kt deleted file mode 100644 index f1331a576..000000000 --- a/core/common/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/IgnoreGzipInterceptor.kt +++ /dev/null @@ -1,21 +0,0 @@ -package eu.kanade.tachiyomi.network.interceptor - -import okhttp3.Interceptor -import okhttp3.Response - -/** - * To use [okhttp3.brotli.BrotliInterceptor] as a network interceptor, - * add [IgnoreGzipInterceptor] right before it. - * - * This nullifies the transparent gzip of [okhttp3.internal.http.BridgeInterceptor] - * so gzip and Brotli are explicitly handled by the [okhttp3.brotli.BrotliInterceptor]. - */ -class IgnoreGzipInterceptor : Interceptor { - override fun intercept(chain: Interceptor.Chain): Response { - var request = chain.request() - if (request.header("Accept-Encoding") == "gzip") { - request = request.newBuilder().removeHeader("Accept-Encoding").build() - } - return chain.proceed(request) - } -}