Skip to content
Permalink
Browse files
HTTPCLIENT-2147: fixed broken preemptive auth in HC Fluent
  • Loading branch information
rrodewald authored and Oleg Kalnichevski committed Apr 7, 2021
1 parent 935abae commit 8f31e6339de0bfdc282c1d2818c0befb3d309a7f
Showing 1 changed file with 2 additions and 2 deletions.
@@ -127,7 +127,7 @@ public Executor auth(final String host, final Credentials credentials) {
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 Executor authPreemptive(final String host) {
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);

0 comments on commit 8f31e63

Please sign in to comment.