[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17316030#comment-17316030
 ] 

ASF subversion and git services commented on HTTPCLIENT-2147:
-------------------------------------------------------------

Commit d65d21d38d7bb497ece89ca42b40f93129b3d0b4 in httpcomponents-client's 
branch refs/heads/5.0.x from rrodewald
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=d65d21d ]

HTTPCLIENT-2147: fixed broken preemptive auth in HC Fluent


> 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
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to