Skip to content

Commit 9908f3e

Browse files
committed
Merge pull request AsyncHttpClient#267 from rubaiyan/master
Fix proxy authentication in ApacheAsyncHttpProvider
2 parents c71e052 + 4a56d5c commit 9908f3e

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)