HTTPCLIENT-2147: fixed broken preemptive auth in HC Fluent
This commit is contained in:
parent
935abae04e
commit
8f31e6339d
|
@ -127,7 +127,7 @@ public class Executor {
|
|||
public Executor authPreemptive(final HttpHost host) {
|
||||
if (this.credentialsStore != null) {
|
||||
final Credentials credentials = this.credentialsStore.getCredentials(new AuthScope(host), null);
|
||||
if (credentials == null) {
|
||||
if (credentials != null) {
|
||||
final BasicScheme basicScheme = new BasicScheme();
|
||||
basicScheme.initPreemptive(credentials);
|
||||
this.authCache.put(host, basicScheme);
|
||||
|
@ -152,7 +152,7 @@ public class Executor {
|
|||
public Executor authPreemptiveProxy(final HttpHost proxy) {
|
||||
if (this.credentialsStore != null) {
|
||||
final Credentials credentials = this.credentialsStore.getCredentials(new AuthScope(proxy), null);
|
||||
if (credentials == null) {
|
||||
if (credentials != null) {
|
||||
final BasicScheme basicScheme = new BasicScheme();
|
||||
basicScheme.initPreemptive(credentials);
|
||||
this.authCache.put(proxy, basicScheme);
|
||||
|
|
Loading…
Reference in New Issue