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:20:08 UTC

[httpcomponents-client] branch master updated (36b362a -> 8f31e63)

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git.


 discard 36b362a  Bugfix for https://issues.apache.org/jira/browse/HTTPCLIENT-2147
     new 8f31e63  HTTPCLIENT-2147: fixed broken preemptive auth in HC Fluent

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (36b362a)
            \
             N -- N -- N   refs/heads/master (8f31e63)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:

[httpcomponents-client] 01/01: HTTPCLIENT-2147: fixed broken preemptive auth in HC Fluent

Posted by ol...@apache.org.
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

commit 8f31e6339de0bfdc282c1d2818c0befb3d309a7f
Author: rrodewald <ro...@kopsis.com>
AuthorDate: Tue Apr 6 18:12:49 2021 +0200

    HTTPCLIENT-2147: fixed broken preemptive auth in HC Fluent
---
 .../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);