summaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java4
1 files changed, 3 insertions, 1 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 bea064cf1..53160e242 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
@@ -47,7 +47,9 @@ public class BasicAuthorizationInterceptor implements Interceptor {
if (request.tag() instanceof DownloadRequest) {
DownloadRequest downloadRequest = (DownloadRequest) request.tag();
userInfo = URIUtil.getURIFromRequestUrl(downloadRequest.getSource()).getUserInfo();
- if (TextUtils.isEmpty(userInfo)) {
+ if (TextUtils.isEmpty(userInfo)
+ && (!TextUtils.isEmpty(downloadRequest.getUsername())
+ || !TextUtils.isEmpty(downloadRequest.getPassword()))) {
userInfo = downloadRequest.getUsername() + ":" + downloadRequest.getPassword();
}
} else {