[Pkg-javascript-commits] [sockjs-client] 330/434: Actually, xhr transports require preflight - two round trips

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:23 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 2cae394d9cf3663b3591de23b3a45308f863ad05
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Wed Jan 18 15:42:13 2012 +0000

    Actually, xhr transports require preflight - two round trips
---
 lib/trans-xhr.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/trans-xhr.js b/lib/trans-xhr.js
index 0e1f259..1f8e262 100644
--- a/lib/trans-xhr.js
+++ b/lib/trans-xhr.js
@@ -19,7 +19,6 @@ AjaxBasedTransport.prototype.doCleanup = function() {
     }
 };
 
-
 // xhr-streaming
 var XhrStreamingTransport = SockJS['xhr-streaming'] = function(ri, trans_url) {
     this.run(ri, trans_url, '/xhr_streaming', XhrReceiver, utils.XHRObject);
@@ -31,6 +30,7 @@ XhrStreamingTransport.enabled = function() {
     return (_window.XMLHttpRequest &&
             'withCredentials' in new XMLHttpRequest());
 };
+XhrStreamingTransport.roundTrips = 2; // preflight, ajax
 
 // According to:
 //   http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
@@ -47,6 +47,7 @@ XdrStreamingTransport.prototype = new AjaxBasedTransport();
 XdrStreamingTransport.enabled = function() {
     return !!_window.XDomainRequest;
 };
+XdrStreamingTransport.roundTrips = 2; // preflight, ajax
 
 
 
@@ -58,6 +59,7 @@ var XhrPollingTransport = SockJS['xhr-polling'] = function(ri, trans_url) {
 XhrPollingTransport.prototype = new AjaxBasedTransport();
 
 XhrPollingTransport.enabled = XhrStreamingTransport.enabled;
+XhrPollingTransport.roundTrips = 2; // preflight, ajax
 
 
 // xdr-polling
@@ -68,4 +70,4 @@ var XdrPollingTransport = SockJS['xdr-polling'] = function(ri, trans_url) {
 XdrPollingTransport.prototype = new AjaxBasedTransport();
 
 XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
-
+XdrPollingTransport.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