aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-11-04 17:52:21 +0000
committerNarayan Kamath <narayan@google.com>2013-11-04 18:13:18 +0000
commit49d9ce3394234904623bdcc8d781017e58008a37 (patch)
treef48d5cb90ff9c073c1f6bd139b5b2ddadaa13ce3
parent18685c9f8d0f64f781cdd7df91aea7eb49679e81 (diff)
downloadokhttp-kitkat-mr1.1-release.tar.gz
This is a manual cherry pick of change https://github.com/square/okhttp/pull/345 bug: 11473660 Change-Id: Ic757bec6c63ebad7f06922c16120f9b6161b7691
-rw-r--r--src/main/java/com/squareup/okhttp/internal/http/HttpAuthenticator.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/squareup/okhttp/internal/http/HttpAuthenticator.java b/src/main/java/com/squareup/okhttp/internal/http/HttpAuthenticator.java
index 63f39e4..1ad3689 100644
--- a/src/main/java/com/squareup/okhttp/internal/http/HttpAuthenticator.java
+++ b/src/main/java/com/squareup/okhttp/internal/http/HttpAuthenticator.java
@@ -39,7 +39,7 @@ public final class HttpAuthenticator {
@Override public Credential authenticate(
Proxy proxy, URL url, List<Challenge> challenges) throws IOException {
for (Challenge challenge : challenges) {
- if (!"Basic".equals(challenge.getScheme())) {
+ if (!"Basic".equalsIgnoreCase(challenge.getScheme())) {
continue;
}
@@ -56,7 +56,7 @@ public final class HttpAuthenticator {
@Override public Credential authenticateProxy(
Proxy proxy, URL url, List<Challenge> challenges) throws IOException {
for (Challenge challenge : challenges) {
- if (!"Basic".equals(challenge.getScheme())) {
+ if (!"Basic".equalsIgnoreCase(challenge.getScheme())) {
continue;
}
@@ -146,7 +146,7 @@ public final class HttpAuthenticator {
// It needs to be fixed to handle any scheme and any parameters
// http://code.google.com/p/android/issues/detail?id=11140
- if (!value.regionMatches(pos, "realm=\"", 0, "realm=\"".length())) {
+ if (!value.regionMatches(true, pos, "realm=\"", 0, "realm=\"".length())) {
break; // Unexpected challenge parameter; give up!
}