[Pkg-javascript-commits] [sockjs-client] 315/350: Fix #249 use proper base url for iframe-based info receiver
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:34 UTC 2016
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 3eff1ff49809802b8c1c7f576949198292f7ac08
Author: Bryce Kahle <bkahle at gmail.com>
Date: Sun Jul 19 17:50:30 2015 -0700
Fix #249 use proper base url for iframe-based info receiver
---
lib/info-iframe.js | 4 ++--
lib/info-receiver.js | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/info-iframe.js b/lib/info-iframe.js
index f5623bd..302dcff 100644
--- a/lib/info-iframe.js
+++ b/lib/info-iframe.js
@@ -13,12 +13,12 @@ if (process.env.NODE_ENV !== 'production') {
debug = require('debug')('sockjs-client:info-iframe');
}
-function InfoIframe(url) {
+function InfoIframe(baseUrl, url) {
var self = this;
EventEmitter.call(this);
var go = function() {
- var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, url);
+ var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
ifr.once('message', function(msg) {
if (msg) {
diff --git a/lib/info-receiver.js b/lib/info-receiver.js
index 86a0164..afefea5 100644
--- a/lib/info-receiver.js
+++ b/lib/info-receiver.js
@@ -30,7 +30,7 @@ inherits(InfoReceiver, EventEmitter);
// TODO this is currently ignoring the list of available transports and the whitelist
-InfoReceiver._getReceiver = function(url, urlInfo) {
+InfoReceiver._getReceiver = function(baseUrl, url, urlInfo) {
// determine method of CORS support (if needed)
if (urlInfo.sameOrigin) {
return new InfoAjax(url, XHRLocal);
@@ -42,7 +42,7 @@ InfoReceiver._getReceiver = function(url, urlInfo) {
return new InfoAjax(url, XDR);
}
if (InfoIframe.enabled()) {
- return new InfoIframe(url);
+ return new InfoIframe(baseUrl, url);
}
return new InfoAjax(url, XHRFake);
};
@@ -53,7 +53,7 @@ InfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) {
;
debug('doXhr', url);
- this.xo = InfoReceiver._getReceiver(url, urlInfo);
+ this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
this.timeoutRef = setTimeout(function() {
debug('timeout');
--
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