XMLHttpRequest response has no headers in Internet Explorer

I am doing XMLHttpRequest using ExtJS for a service that does not return a responseText, a total of 204 and a TotalNearby response header. The call works fine with Firefox, but with Internet Explorer 8, both alerts are empty. What am I doing wrong?

Ext.Ajax.request({
    url: 'services/getNearby',
    method: 'GET',
    params: {
        'lat': 34,
        'lon': -90
    },
    headers: {
        'Authorization': AUTH_TOKEN
    },
    success: function(response) {
        if (response.status == 204) {
            alert(response.getAllResponseHeaders());
            alert(response.getResponseHeader('Total-Nearby'));
        }
    },
    failure: function(response) {
        alert('Server status ' + response.status);
    }
});
+3
source share
1 answer

According to the website http://www.enhanceie.com/ie/bugs.asp , this is an IE 7/8 error:

IE0013: IE XMLHTTP implementation turns response code 204 into dummy status code 1223

http://dev.jquery.com/ticket/1450, XMLHTTPRequest IE 1223 , HTTP/204 .

URLMon ( (1223), ).

IE8, IE7 (, , ).

: "1223" 204. . HTTP .

, IE 1223, . :

. HTTP .

, , , . , ? , .

+5

Source: https://habr.com/ru/post/1776731/


All Articles