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

Michael Osipov commented on HTTPCLIENT-2171:
--------------------------------------------

Oleg, you test contains a forward slash, not a backslash. 

> 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]

Reply via email to