×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Rosario, Santa Fe - Argentina
    Posts
    6

    Unhappy s40 bug while getting responseHeaders

    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
    Last edited by vrunoa; 2012-06-02 at 16:05.
    vruno

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2011
    Posts
    3

    Re: s40 bug while getting responseHeaders

    @vruno Keep in mind S40 web apps are using a proxy server, This is a good overview http://www.developer.nokia.com/Commu...es_40_Web_Apps

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    Rosario, Santa Fe - Argentina
    Posts
    6

    Re: s40 bug while getting responseHeaders

    I know, but i didnt think the proxy server wouldnt get the request headers. It would be a really good feature to have this.
    vruno

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×