You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2021/04/07 06:14:05 UTC
[httpcomponents-client] branch master updated: Bugfix for
https://issues.apache.org/jira/browse/HTTPCLIENT-2147
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 36b362a Bugfix for https://issues.apache.org/jira/browse/HTTPCLIENT-2147
36b362a is described below
commit 36b362a646487bddf08429361ac1a8d9069f17fa
Author: rrodewald <ro...@kopsis.com>
AuthorDate: Tue Apr 6 18:12:49 2021 +0200
Bugfix for https://issues.apache.org/jira/browse/HTTPCLIENT-2147
---
.../src/main/java/org/apache/hc/client5/http/fluent/Executor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Executor.java b/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Executor.java
index c1d8b7d..29b7023 100644
--- a/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Executor.java
+++ b/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Executor.java
@@ -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);