From 7a866cd7cedfeca48992fe502cc09eaf2871b443 Mon Sep 17 00:00:00 2001 From: Annie the Eagle Date: Tue, 7 Mar 2017 21:58:43 +0000 Subject: [PATCH] Issue #355 - Fix compatibility with latest Deluge. Also upgrade Gradle. --- .../main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java | 3 ++- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java b/app/src/main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java index ceb9688e..da39ecf5 100644 --- a/app/src/main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java +++ b/app/src/main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java @@ -71,7 +71,6 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.net.URI; -import java.net.URLDecoder; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -523,6 +522,7 @@ public class DelugeAdapter implements IDaemonAdapter { // Set POST URL and data HttpPost httppost = new HttpPost(buildWebUIUrl() + PATH_TO_RPC); + httppost.setHeader("content-type", "application/json"); StringEntity se = new StringEntity(loginRequest.toString()); httppost.setEntity(se); @@ -554,6 +554,7 @@ public class DelugeAdapter implements IDaemonAdapter { // Set POST URL and data HttpPost httppost = new HttpPost(buildWebUIUrl() + PATH_TO_RPC); + httppost.setHeader("content-type", "application/json"); StringEntity se = new StringEntity(data.toString()); httppost.setEntity(se); diff --git a/build.gradle b/build.gradle index 5657e594..86d687a9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:2.2.0' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2890231d..1b7cccdb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jan 20 12:20:00 CET 2016 +#Tue Mar 07 21:09:46 GMT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip