You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Robert Rodewald (Jira)" <ji...@apache.org> on 2021/04/06 15:16:00 UTC

[jira] [Created] (HTTPCLIENT-2147) authPreemptive and authPreemptiveProxy do not work in fluent api

Robert Rodewald created HTTPCLIENT-2147:
-------------------------------------------

             Summary: authPreemptive and authPreemptiveProxy do not work in fluent api
                 Key: HTTPCLIENT-2147
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2147
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: Fluent HC
    Affects Versions: 5.0.3
            Reporter: Robert Rodewald


Setting preemptive authentication for a host has no effect.

Looking at the source code I would say the condition for caching the credentials in the authCache is wrong:
{code:java}
 final Credentials credentials = this.credentialsStore.getCredentials(new AuthScope(host), null);
 if (credentials == null) {
   final BasicScheme basicScheme = new BasicScheme();
   basicScheme.initPreemptive(credentials);
   this.authCache.put(host, basicScheme);
 }{code}
In my opinion it should be
{code:java}
credentials != null{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org