From bb1eb2310c449c10df148012fcccc3daefdb4337 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Fri, 9 Jul 2021 15:10:11 +1000 Subject: [PATCH] Supply fake Accept-Language header --- .../src/main/java/org/session/libsignal/utilities/HTTP.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsignal/src/main/java/org/session/libsignal/utilities/HTTP.kt b/libsignal/src/main/java/org/session/libsignal/utilities/HTTP.kt index 020d0f5bde..d8bb5ec42a 100644 --- a/libsignal/src/main/java/org/session/libsignal/utilities/HTTP.kt +++ b/libsignal/src/main/java/org/session/libsignal/utilities/HTTP.kt @@ -88,7 +88,9 @@ object HTTP { * Sync. Don't call from the main thread. */ fun execute(verb: Verb, url: String, body: ByteArray?, timeout: Long = HTTP.timeout, useSeedNodeConnection: Boolean = false): Map<*, *> { - val request = Request.Builder().url(url).removeHeader("User-Agent").addHeader("User-Agent", "WhatsApp") + val request = Request.Builder().url(url) + .removeHeader("User-Agent").addHeader("User-Agent", "WhatsApp") + .removeHeader("Accept-Language").addHeader("Accept-Language", "en-us") when (verb) { Verb.GET -> request.get() Verb.PUT, Verb.POST -> {