I'm building a client for an api that uses http digest access authentication for authentication. I have studied the rfc to know the setup the required response headers and this works well on my emulator. Problem howev开发者_JAVA百科er is when I test on my phone (nokia E5), I found out that getting the www-authenticate header from the returned headers doesnt get the full value
[code]
// c = (HttpConnection) Connector.open(url) and other declarations
String digest = c.getHeaderField("WWW-Authenticate");
System.out.println(digest); // gives only: Digest
//no realm, qop and others
[/code]
I'm I doing something wrong or it is from the phone? What are my other options?
I have faced this problem in some nokias
, and yes, it is a bogus HttpConnection
implementation ... I suggest you to try creating a new header
from the server
side with a base64 encoded WWW-Authenticate-encoded header
and using it instead, or you can do it the hard way and implement the whole HttpConnection
from scratch ...
精彩评论