[Pkg-javascript-commits] [sockjs-client] 419/434: Work around another IE bug - 204 gets mangled to 1223

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit a7769b370b9cc199e59e5a9cfc12f9549654d991
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Fri May 18 16:37:35 2012 +0100

    Work around another IE bug - 204 gets mangled to 1223
---
 lib/dom2.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/dom2.js b/lib/dom2.js
index 27bd3a2..56dd0ec 100644
--- a/lib/dom2.js
+++ b/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;
             }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list