Skip to content

Commit 047a9fa

Browse files
committed
fix issue aws#5884
1 parent 85e49a3 commit 047a9fa

File tree

1 file changed

+5
-0
lines changed
  • http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/internal/utils

1 file changed

+5
-0
lines changed

http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/internal/utils/ApacheUtils.java

+5
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ private static void addPreemptiveAuthenticationProxy(HttpClientContext clientCon
149149
AuthCache authCache = new BasicAuthCache();
150150
// Generate BASIC scheme object and add it to the local auth cache
151151
BasicScheme basicAuth = new BasicScheme();
152+
try {
153+
basicAuth.processChallenge(new BasicHeader(AUTH.PROXY_AUTH, "BASIC realm=default"));
154+
} catch (MalformedChallengeException e) {
155+
throw new RuntimeException(e);
156+
}
152157
authCache.put(targetHost, basicAuth);
153158

154159
clientContext.setCredentialsProvider(credsProvider);

0 commit comments

Comments
 (0)