hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Usha_N <usha.na...@siemens.com>
Subject Re: apache commons HttpClient Base64 encoding of multibyte characters issue
Date Fri, 22 Jan 2010 17:36:41 GMT

Sorry I was mistaken, it's commons-httpclient-2.0.2 version of jar file.
 



Usha_N wrote:
> 
> Hello,
> 
> We are using apache commons HttpClient library
> (commons-httpclient-3.1.jar). 
> 
> Users are providing username and password that has multibyte characters in
> it. Base64 encoding of the mutlitbyte characters in HttpClient doesn’t
> seem to be working.
> 
> 
> Below API’s are used:
> 
>                   Credentials credents = new
> UsernamePasswordCredentials(userId, password);
>                   m_httpState.setCredentials(realm, m_host, credents);
> 
> m_httpClient.executeMethod(m_hostConf,httpmethod,m_httpState);
> 
> I have a text 
> 
> test1:测试组:Designer:test1
> 
> Capturing the network trace from the client that uses the above jar (note:
> the authorization header):
> HEAD /tc/FileAccess/ HTTP/1.1
> User-Agent: DAKCLIENT/7.0
> Accept-Language: zh-CN
> Authorization: Basic dGVzdDE6Pz8/OkRlc2lnbmVyOnRlc3Qx
> Host: ahi6w033:8888
> 
> 
> Using the online Base64 decoder utility
> (http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/Default.aspx) ,
> passing dGVzdDE6Pz8/OkRlc2lnbmVyOnRlc3Qx results the decoding to be
> test1:???:Designer:test1 (note: ???)
> 
> Using the online encoder utility: test1:测试组:Designer:test1  gets Base64
> encoded as  :
>  dGVzdDE65rWL6K+V57uEOkRlc2lnbmVyOnRlc3Qx
> 
> This makes me believe that Base64 encodign in common’s apache isn’t
> working correctly.
> 
> Please help and advice.
> 
> Thanks..
> Usha
> 
> 

-- 
View this message in context: http://old.nabble.com/apache-commons-HttpClient-Base64-encoding-of-multibyte-characters-issue-tp27263367p27277174.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Mime
View raw message