From 849a5a0958d75cfebd50293a52985d582f23977c Mon Sep 17 00:00:00 2001 From: Niedermann IT-Dienstleistungen Date: Thu, 12 Apr 2018 09:48:02 +0200 Subject: [PATCH] Eleminate not needed toast on HTTP 304 https://github.com/square/retrofit/issues/805#issuecomment-93426183 https://stackoverflow.com/a/23244575 --- .../java/it/niedermann/owncloud/notes/util/NotesClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/util/NotesClient.java b/app/src/main/java/it/niedermann/owncloud/notes/util/NotesClient.java index 8f3daee8..aab3c1c2 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/util/NotesClient.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/util/NotesClient.java @@ -143,6 +143,8 @@ public class NotesClient { con.setRequestProperty( "Authorization", "Basic " + Base64.encodeToString((username + ":" + password).getBytes(), Base64.NO_WRAP)); + // https://github.com/square/retrofit/issues/805#issuecomment-93426183 + con.setRequestProperty( "Connection", "Close"); con.setRequestProperty("User-Agent", "nextcloud-notes/" + BuildConfig.VERSION_NAME + " (Android)"); if (lastETag != null && METHOD_GET.equals(method)) { con.setRequestProperty("If-None-Match", lastETag);