summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java b/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java
index 394eb3943..a2facae64 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java
@@ -50,6 +50,10 @@ public class BasicAuthorizationInterceptor implements Interceptor {
}
Request.Builder newRequest = request.newBuilder();
+ if (!TextUtils.equals(response.request().url().toString(), request.url().toString())) {
+ newRequest.url(response.request().url());
+ }
+
Log.d(TAG, "Authorization failed, re-trying with ISO-8859-1 encoded credentials");
String credentials = HttpDownloader.encodeCredentials(parts[0], parts[1], "ISO-8859-1");
newRequest.header("Authorization", credentials);