Skip to content
Browse files

Work around another IE bug - 204 gets mangled to 1223

  • Loading branch information...
1 parent 7c85c6b commit a7769b370b9cc199e59e5a9cfc12f9549654d991 @majek majek committed May 18, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/dom2.js
View
9 lib/dom2.js
@@ -60,13 +60,20 @@ AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
var status = x.status;
var text = x.responseText;
} catch (x) {};
+ // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
+ if (status === 1223) status = 204;
+
// IE does return readystate == 3 for 404 answers.
if (text && text.length > 0) {
that.emit('chunk', status, text);
}
break;
case 4:
- that.emit('finish', x.status, x.responseText);
+ var status = x.status;
+ // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
+ if (status === 1223) status = 204;
+
+ that.emit('finish', status, x.responseText);
that._cleanup(false);
break;
}

0 comments on commit a7769b3

Please sign in to comment.
Something went wrong with that request. Please try again.