Skip to content

Commit a7769b3

Browse files
committed
Work around another IE bug - 204 gets mangled to 1223
1 parent 7c85c6b commit a7769b3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/dom2.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,20 @@ AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
6060
var status = x.status;
6161
var text = x.responseText;
6262
} catch (x) {};
63+
// IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
64+
if (status === 1223) status = 204;
65+
6366
// IE does return readystate == 3 for 404 answers.
6467
if (text && text.length > 0) {
6568
that.emit('chunk', status, text);
6669
}
6770
break;
6871
case 4:
69-
that.emit('finish', x.status, x.responseText);
72+
var status = x.status;
73+
// IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
74+
if (status === 1223) status = 204;
75+
76+
that.emit('finish', status, x.responseText);
7077
that._cleanup(false);
7178
break;
7279
}

0 commit comments

Comments
 (0)