From ce41b3cce9e59f624f322be8c26a465029a22bb1 Mon Sep 17 00:00:00 2001 From: Christophe Henry Date: Thu, 25 Mar 2021 19:42:48 +0100 Subject: [PATCH] Fix crash happening when trying to fetch images from HTTP connexions --- .../main/java/app/fedilab/android/client/HttpsConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/client/HttpsConnection.java b/app/src/main/java/app/fedilab/android/client/HttpsConnection.java index 0b71fc085..016f97555 100644 --- a/app/src/main/java/app/fedilab/android/client/HttpsConnection.java +++ b/app/src/main/java/app/fedilab/android/client/HttpsConnection.java @@ -303,9 +303,9 @@ public class HttpsConnection { URL url = new URL(urlConnection); if (proxy != null) - httpURLConnection = (HttpsURLConnection) url.openConnection(proxy); + httpURLConnection = (HttpURLConnection) url.openConnection(proxy); else - httpURLConnection = (HttpsURLConnection) url.openConnection(); + httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setConnectTimeout(30 * 1000); httpURLConnection.setRequestProperty("http.keepAlive", "false"); httpURLConnection.setRequestProperty("Content-Type", "application/json");