[tor-commits] [flashproxy/master] Safari requires "new" on the WebSocket constructor.
dcf at torproject.org
dcf at torproject.org
Mon Apr 9 04:08:42 UTC 2012
commit 9396261d8f6d2b9543aef8f490856f15daa458e8
Author: David Fifield <david at bamsoftware.com>
Date: Mon Apr 2 13:57:21 2012 -0700
Safari requires "new" on the WebSocket constructor.
---
flashproxy.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/flashproxy.js b/flashproxy.js
index 167ec2c..9a0b4fa 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -226,7 +226,7 @@ function make_websocket(addr)
url = "ws://" + encodeURIComponent(addr.host)
+ ":" + encodeURIComponent(addr.port) + "/";
- return (window.WebSocket || window.MozWebSocket)(url, "base64");
+ return new (window.WebSocket || window.MozWebSocket)(url, "base64");
}
function FlashProxy()
More information about the tor-commits
mailing list