Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Aug 2007
    Posts
    9
    Vote Rating
    0
    dirving is on a distinguished road

      0  

    Exclamation [FIXED][3.x] Problem with XHR getReponseHeader

    [FIXED][3.x] Problem with XHR getReponseHeader


    Hi everyone,

    I found what I believe to be a bug in the method createResponseObject in the ext adapter. The problem code is:

    Code:
                    headerStr = o.conn.getAllResponseHeaders();                 
                    Ext.each(headerStr.split('\n'), function(v){ 
                        var t = v.split(':'); 
                        headerObj[t[0]] = t[1];  
                    });
    The problem that is happening is that when a header value contains a colon it does not get returned correctly. This is obviously occurring as a result of the split and following assignment. If the assignment line is changed to read:

    Code:
                    headerStr = o.conn.getAllResponseHeaders();                 
                    Ext.each(headerStr.split('\n'), function(v){ 
                        var t = v.split(':'); 
                        headerObj[t[0]] = t.slice(1,t.length).join(':');  
                    });
    it seems to work fine.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,126
    Vote Rating
    516
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Out of interest/testing can you post the response headers you were using? Thanks.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    It's always possible that a header value contains a colon (first example that comes to mind is the redirect location url).

    I would suggest:
    Code:
    Ext.each(headerStr.split('\n'), function(v){
    	var t = v.indexOf(':');
    	headerObj[v.substr(0, t)] = v.substr(t + 1);
    });

  4. #4
    Ext User
    Join Date
    Aug 2007
    Posts
    9
    Vote Rating
    0
    dirving is on a distinguished road

      0  

    Default


    Another example would be anything that contains date/time information (Date, Last-Modified, Expires, If-Modified-Since, etc)

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,126
    Vote Rating
    516
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Fixed in SVN.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar