Hello everyone, im trying to implement a digest method on an s40 web app and I found out that the xmlHttpRequest.getAllResponseHeaders() is retrieving the nokia browser response headers and not the ones from the site where i make the xmlHttpRequest.
Is this a bug on the s40 nokia browser or is it blocked for some reason ?
My code is:
this.getAuth = function(rURL, callback) {
try{
var aux = this;
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if(xmlHttp.readyState == 4) {
if(xmlHttp.status = 401) {
try {
var headers = xmlHttp.getResponseHeader("WWW-Authenticate");
auth_response_header = headers;
console.log(auth_response_header);
// console.log(xmlHttp.getAllResponseHeaders());
callback();
return;
}catch(e) { document.write(e.toString()); }
}else { console.log("algo no anda bien"); }
}
};
xmlHttp.open('GET', exit.baseAPI+rURL, false);
xmlHttp.setRequestHeader("X-User-Agent", "symbian");
xmlHttp.send(null);
}catch(e) { document.write(e.toString()); }
};
The responseHeaders I should receive are:
Date: Sat, 02 Jun 2012 14:46:06 GMT
WWW-Authenticate: Digest realm="App", qop="auth", nonce="MTMzODY0ODQ0Njc2MTpjZjEzNTllODE4ZjcwYzE0N2JlZDcyODgzODMyODlkOA=="
Content-Length: 1119
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
and instead the nokia broswer response is null
is my question understood ?
Thanks

Reply With Quote

