diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java index 93a58af06..bca3792b0 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/AntennapodHttpClient.java @@ -77,6 +77,9 @@ public class AntennapodHttpClient { if (response.code() == HttpURLConnection.HTTP_MOVED_PERM || response.code() == StatusLine.HTTP_PERM_REDIRECT) { String location = response.header("Location"); + if (location == null) { + return response; + } if (location.startsWith("/")) { // URL is not absolute, but relative HttpUrl url = request.url(); location = url.scheme() + "://" + url.host() + location;