[
https://issues.apache.org/jira/browse/HTTPCLIENT-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17401341#comment-17401341
]
neng xu commented on HTTPCLIENT-2171:
-------------------------------------
The test case is different from real usage.
Here is my finding
In your test case, comment this line
Assert.assertTrue(authscheme.isResponseReady(host, credentialsProvider, null));
Your test case failed.
With a real test code,
Test calls authscheme.isResponseReady(host, credentialsProvider, null)
Test printout authscheme.generateAuthResponse(host, request, null) and you can
see right userId.
But, the SSL trace showed a wrong userId. The test failed.
Summary: The test case does not detect the problem..
> Basic Authentication Failed With UserId containing "\"
> ------------------------------------------------------
>
> Key: HTTPCLIENT-2171
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2171
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (classic)
> Affects Versions: 5.1
> Reporter: neng xu
> Priority: Major
>
> When upgrade HttpClient from 4.5.x version to 5.1, a problem happened when
> using UserId =ADPTestSandbox\Phoenix.API.
> All other userIds which do not have "\" work with HttpClient5.1.
> UserId which has "\" works with HttpClient 3.x and 4.5.x. but not HttpClient
> 5.1
> Test code:
> ..........
> BasicCredentialsProvider provider = new BasicCredentialsProvider();
> UsernamePasswordCredentials credentials = new
> UsernamePasswordCredentials(usrId,password.toCharArray());
> provider.setCredentials(new AuthScope(null, -1), credentials);
> CloseableHttpClient httpclient =
> HttpClients.custom().setDefaultCredentialsProvider(provider).build();
> .............
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]