File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Basic Authentication and encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Basic Authentication and encoding" Watch "Basic Authentication and encoding" New topic

Basic Authentication and encoding

Don Hill

Joined: Apr 07, 2004
Posts: 4
I am trying to find information on the encoding of the basic authentication header, I know that it used base64 encoding for transmitting over the wire but there is also other encoding once the bytes are decoded. Heres a couple of questions.
1.) if I have a chinese OS using a browser with a char set of GB2312 encoding, this browser will be connecting to a machine with CP1252 windows default j2ee server in north america, how is the encoding determine or set.
2.) same case for a North America browser connecting to a Chinese server.
3.) Chinese -> Chinese server
Any thought or help would be great.
Brahim Bakayoko
Ranch Hand

Joined: Aug 29, 2003
Posts: 155
The encoding received will be whatever was sent by the client browser.
If the encoding is not supported the server will simply receive garbage.

SCJP, SCWCD, SCBCD, IBM CSD WebSphere v5, <br />A+, MCP 2000 and 2000 server, CST, and few incompleted certification tracks.<br /> <br />Ivory Coast<br /> <br />Analyze your web Request/Response @ <a href="" target="_blank" rel="nofollow"></a> down for a while...
Don Hill

Joined: Apr 07, 2004
Posts: 4
ok, this is fine, I was trying to find info on the http or something that backs this up, I had come to this realization during my testing cycle, is this in the spec or is it that basic auth is broken in this sense.
If you have any more info that you would like to pass on, fell free,
Thanks again.
Is the src of the RRA page available ?
I agree. Here's the link:
subject: Basic Authentication and encoding
It's not a secret anymore!