[Pkg-javascript-commits] [sockjs-client] 19/22: Accept a base URL (which can be relative) from /info.

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


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

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

commit b3181bfcd51ce90742d386bef8b400e1defe1b0a
Author: David Glasser <glasser at meteor.com>
Date:   Tue Oct 1 16:16:24 2013 -0700

    Accept a base URL (which can be relative) from /info.
---
 lib/sockjs.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/sockjs.js b/lib/sockjs.js
index 1e42489..c3f7417 100644
--- a/lib/sockjs.js
+++ b/lib/sockjs.js
@@ -256,6 +256,10 @@ SockJS.prototype._applyInfo = function(info, rtt, protocols_whitelist) {
     that._options.rtt = rtt;
     that._options.rto = utils.countRTO(rtt);
     that._options.info.null_origin = !_document.domain;
+    // Servers can override base_url, eg to provide a randomized domain name and
+    // avoid browser per-domain connection limits.
+    if (info.base_url)
+      that._base_url = utils.amendUrl(info.base_url);
     var probed = utils.probeProtocols();
     that._protocols = utils.detectProtocols(probed, protocols_whitelist, info);
 };

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