Skip to content

Commit 4a56d5c

Browse files
author
Omar Alrubaiyan
committed
Fix proxy authentication in ApacheAsyncHttpProvider
1 parent c71e052 commit 4a56d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I
345345

346346
if (proxyServer.getPrincipal() != null) {
347347
Credentials defaultcreds = new UsernamePasswordCredentials(proxyServer.getPrincipal(), proxyServer.getPassword());
348-
client.getState().setCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds);
348+
client.getState().setProxyCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds);
349349
}
350350

351351
ProxyHost proxyHost = proxyServer == null ? null : new ProxyHost(proxyServer.getHost(), proxyServer.getPort());

0 commit comments

Comments
 (0)