diff options
author | Neuman Vong <neuman@twilio.com> | 2011-04-27 15:45:07 -0700 |
---|---|---|
committer | Neuman Vong <neuman@twilio.com> | 2011-04-27 15:45:07 -0700 |
commit | 3ab0e24c3580ba263cc48760a91aa0bf90b70e6b (patch) | |
tree | 4214366f7b4b63c7f09361a498fff5f5fe1134fe | |
parent | 93034d8baa85ebf01915dd71d9a3c7ebeb36bee4 (diff) | |
download | web-socket-js-3ab0e24c3580ba263cc48760a91aa0bf90b70e6b.tar.gz |
Default to 443 default port for wss
-rw-r--r-- | flash-src/WebSocket.as | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/flash-src/WebSocket.as b/flash-src/WebSocket.as index 04d7f05..5b32b76 100644 --- a/flash-src/WebSocket.as +++ b/flash-src/WebSocket.as @@ -65,7 +65,8 @@ public class WebSocket extends EventDispatcher { if (!m) fatal("SYNTAX_ERR: invalid url: " + url); this.scheme = m[1]; this.host = m[2]; - this.port = parseInt(m[4] || "80"); + var defaultPort:int = scheme == "wss" ? 443 : 80; + this.port = parseInt(m[4]) || defaultPort; this.path = (m[5] || "/") + (m[6] || ""); this.origin = origin; this.protocol = protocol; |