[Pkg-javascript-commits] [sockjs-client] 118/434: options.cookie may have one of three valid values: true, false or undefined.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:08 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 c89804493d1ec52c62d23df19a156c9ae53437f6
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Mon Sep 5 16:42:16 2011 +0100

    options.cookie may have one of three valid values: true,false or undefined.
---
 lib/trans-iframe-htmlfile.js | 2 +-
 lib/trans-xhr-streaming.js   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/trans-iframe-htmlfile.js b/lib/trans-iframe-htmlfile.js
index 45ba270..cf648c1 100644
--- a/lib/trans-iframe-htmlfile.js
+++ b/lib/trans-iframe-htmlfile.js
@@ -15,7 +15,7 @@ HtmlFileIframeTransport.prototype = new IframeTransport();
 HtmlFileIframeTransport.enabled = function (options) {
     // Development or IE  _and_  iframe postWindow working.
     var ie = isIeHtmlfileCapable();
-    return (options.devel || ie) && IframeTransport.enabled();
+    return (options.cookie !== false && IframeTransport.enabled());
 };
 
 HtmlFileIframeTransport.need_chunking = true;
diff --git a/lib/trans-xhr-streaming.js b/lib/trans-xhr-streaming.js
index 7348f5e..98189aa 100644
--- a/lib/trans-xhr-streaming.js
+++ b/lib/trans-xhr-streaming.js
@@ -23,7 +23,7 @@ XhrStreamingTransport.prototype.doCleanup = function() {
 //   http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
 //   http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
 XhrStreamingTransport.enabled = function(options) {
-    if (!options.cookie && window.XDomainRequest) return true;
+    if (options.cookie !== true && window.XDomainRequest) return true;
     if (window.XMLHttpRequest &&
         'withCredentials' in new XMLHttpRequest()) return true;
     return false;

-- 
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