diff options
author | Christian Ludwig <chrissicool@gmail.com> | 2012-11-25 20:25:13 +0100 |
---|---|---|
committer | Christian Ludwig <chrissicool@gmail.com> | 2012-11-25 20:25:13 +0100 |
commit | 94c63e9db985565660f0aaa5cd6bd5516a864ed9 (patch) | |
tree | 6ed0dbf111cce754bf4ccbd4fb56e49ff3e2f1fd /src/de/danoeh/antennapod/service | |
parent | 82426bb8e46f5cddb931c1c277841f925ce1e6c2 (diff) | |
download | AntennaPod-94c63e9db985565660f0aaa5cd6bd5516a864ed9.zip |
Obey redirects in HTTP downloads
If an HTTP request returns an error code 301 or 302, follow redirects to the
new location.
Diffstat (limited to 'src/de/danoeh/antennapod/service')
-rw-r--r-- | src/de/danoeh/antennapod/service/download/HttpDownloader.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/service/download/HttpDownloader.java b/src/de/danoeh/antennapod/service/download/HttpDownloader.java index 200e25ac5..a4fdefbe3 100644 --- a/src/de/danoeh/antennapod/service/download/HttpDownloader.java +++ b/src/de/danoeh/antennapod/service/download/HttpDownloader.java @@ -40,6 +40,7 @@ public class HttpDownloader extends Downloader { URL url = new URL(status.getFeedFile().getDownload_url()); connection = (HttpURLConnection) url.openConnection(); connection.setConnectTimeout(CONNECTION_TIMEOUT); + connection.setInstanceFollowRedirects(true); int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { if (AppConfig.DEBUG) { |