diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/http')
-rw-r--r-- | src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java | 6 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/http/HttpUploadConnection.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java index 15bfc8825..cf867d796 100644 --- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java +++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java @@ -295,7 +295,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("User-Agent", mXmppConnectionService.getIqGenerator().getUserAgent()); connection.setRequestProperty("Accept-Encoding", "identity"); if (connection instanceof HttpsURLConnection) { mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive); @@ -377,7 +377,7 @@ public class HttpDownloadConnection implements Transferable { mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive); } connection.setUseCaches(false); - connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getIdentityName()); + connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getUserAgent()); connection.setRequestProperty("Accept-Encoding", "identity"); final boolean tryResume = file.exists() && file.getKey() == null && file.getSize() > 0; long resumeSize = 0; @@ -392,7 +392,7 @@ public class HttpDownloadConnection implements Transferable { connection.connect(); is = new BufferedInputStream(connection.getInputStream()); final String contentRange = connection.getHeaderField("Content-Range"); - boolean serverResumed = tryResume && contentRange != null && contentRange.startsWith("bytes "+resumeSize+"-"); + boolean serverResumed = tryResume && contentRange != null && contentRange.startsWith("bytes " + resumeSize + "-"); long transmitted = 0; if (tryResume && serverResumed) { Log.d(Config.LOGTAG, "server resumed"); diff --git a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java index 589e46d6c..49debcb78 100644 --- a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java +++ b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java @@ -165,7 +165,7 @@ public class HttpUploadConnection implements Transferable { connection.setUseCaches(false); connection.setRequestMethod("PUT"); connection.setFixedLengthStreamingMode(expectedFileSize); - connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getIdentityName()); + connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getUserAgent()); if (slot.getHeaders() != null) { for (HashMap.Entry<String, String> entry : slot.getHeaders().entrySet()) { connection.setRequestProperty(entry.getKey(), entry.getValue()); |