summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-05-01 11:52:46 +0200
committerGitHub <noreply@github.com>2024-05-01 11:52:46 +0200
commit19396c1e17ddadac0e97210b747e274d53065611 (patch)
treec59b89f1bd00bbf2390a9eb3b34844ec09cdd55c
parent3ed5b8af8c7d187b72a0b7693724dcbe97eb3d98 (diff)
downloadAntennaPod-19396c1e17ddadac0e97210b747e274d53065611.zip
Fix password protected feeds (#7155)
-rw-r--r--net/common/src/main/java/de/danoeh/antennapod/net/common/BasicAuthorizationInterceptor.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/common/src/main/java/de/danoeh/antennapod/net/common/BasicAuthorizationInterceptor.java b/net/common/src/main/java/de/danoeh/antennapod/net/common/BasicAuthorizationInterceptor.java
index 8e7b9a4f4..e7332b2b5 100644
--- a/net/common/src/main/java/de/danoeh/antennapod/net/common/BasicAuthorizationInterceptor.java
+++ b/net/common/src/main/java/de/danoeh/antennapod/net/common/BasicAuthorizationInterceptor.java
@@ -67,6 +67,7 @@ public class BasicAuthorizationInterceptor implements Interceptor {
Log.d(TAG, "Authorization failed, re-trying with ISO-8859-1 encoded credentials");
newRequest.header(HEADER_AUTHORIZATION, HttpCredentialEncoder.encode(username, password, "ISO-8859-1"));
+ response.close();
response = chain.proceed(newRequest.build());
if (response.code() != HttpURLConnection.HTTP_UNAUTHORIZED) {
@@ -75,6 +76,7 @@ public class BasicAuthorizationInterceptor implements Interceptor {
Log.d(TAG, "Authorization failed, re-trying with UTF-8 encoded credentials");
newRequest.header(HEADER_AUTHORIZATION, HttpCredentialEncoder.encode(username, password, "UTF-8"));
+ response.close();
return chain.proceed(newRequest.build());
}
}