[Pkg-javascript-commits] [sockjs-client] 384/434: Fix #60 - Opera 12 doesn't do xhr-streaming
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:27 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 3536557ed14ef8d23145969dd87f88845b7e044f
Author: Marek Majkowski <majek04 at gmail.com>
Date: Fri Apr 13 16:23:50 2012 +0100
Fix #60 - Opera 12 doesn't do xhr-streaming
---
lib/trans-xhr.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/trans-xhr.js b/lib/trans-xhr.js
index 6ddf1a8..4f54997 100644
--- a/lib/trans-xhr.js
+++ b/lib/trans-xhr.js
@@ -27,8 +27,11 @@ var XhrStreamingTransport = SockJS['xhr-streaming'] = function(ri, trans_url) {
XhrStreamingTransport.prototype = new AjaxBasedTransport();
XhrStreamingTransport.enabled = function() {
+ // Support for CORS Ajax aka Ajax2? Opera 12 claims CORS but
+ // doesn't do streaming.
return (_window.XMLHttpRequest &&
- 'withCredentials' in new XMLHttpRequest());
+ 'withCredentials' in new XMLHttpRequest() &&
+ (!/opera/i.test(navigator.userAgent)));
};
XhrStreamingTransport.roundTrips = 2; // preflight, ajax
--
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