Permalink
Browse files

Default to 443 default port for wss

  • Loading branch information...
1 parent 93034d8 commit 3ab0e24c3580ba263cc48760a91aa0bf90b70e6b @luciferous luciferous committed Apr 27, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 flash-src/WebSocket.as
View
@@ -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;

0 comments on commit 3ab0e24

Please sign in to comment.