aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/http
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-24 20:11:46 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-24 20:11:46 +0200
commite71bbf2bbb1917aa5198164209cdc23ac0b7c343 (patch)
tree0abd8795158edea7d27f968349435b83d340a7a0 /src/main/java/de/pixart/messenger/http
parente42c9a515c127e1106a43a62b6aee1e492813f2b (diff)
don't use compression for HttpDownloads
Diffstat (limited to 'src/main/java/de/pixart/messenger/http')
-rw-r--r--src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
index efdfdc61e..15bfc8825 100644
--- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
+++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
@@ -296,6 +296,7 @@ public class HttpDownloadConnection implements Transferable {
connection.setUseCaches(false);
Log.d(Config.LOGTAG, "url: " + connection.getURL().toString());
connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getIdentityName());
+ connection.setRequestProperty("Accept-Encoding", "identity");
if (connection instanceof HttpsURLConnection) {
mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive);
}
@@ -377,6 +378,7 @@ public class HttpDownloadConnection implements Transferable {
}
connection.setUseCaches(false);
connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getIdentityName());
+ connection.setRequestProperty("Accept-Encoding", "identity");
final boolean tryResume = file.exists() && file.getKey() == null && file.getSize() > 0;
long resumeSize = 0;
long expected = file.getExpectedSize();