Niedermann IT-Dienstleistungen 2018-04-12 09:48:02 +02:00
parent ce176157b6
commit 849a5a0958

View file

@ -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);