diff options
author | Neuman Vong <neuman@twilio.com> | 2011-04-28 16:59:32 -0700 |
---|---|---|
committer | Neuman Vong <neuman@twilio.com> | 2011-04-28 16:59:32 -0700 |
commit | 0e76f927c0f576e1068b58afe6026d6faf6fcaf1 (patch) | |
tree | b2444d190e62f1b9b0c7de31974ed471dd41aebf | |
parent | 3ab0e24c3580ba263cc48760a91aa0bf90b70e6b (diff) | |
download | web-socket-js-0e76f927c0f576e1068b58afe6026d6faf6fcaf1.tar.gz |
Only set port in Host if not default port
-rw-r--r-- | WebSocketMain.swf | bin | 175746 -> 175753 bytes | |||
-rw-r--r-- | WebSocketMainInsecure.zip | bin | 166589 -> 166462 bytes | |||
-rw-r--r-- | flash-src/WebSocket.as | 3 |
3 files changed, 2 insertions, 1 deletions
diff --git a/WebSocketMain.swf b/WebSocketMain.swf Binary files differindex 7561215..0fb5449 100644 --- a/WebSocketMain.swf +++ b/WebSocketMain.swf diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip Binary files differindex c02a249..691f84c 100644 --- a/WebSocketMainInsecure.zip +++ b/WebSocketMainInsecure.zip diff --git a/flash-src/WebSocket.as b/flash-src/WebSocket.as index 5b32b76..0cbbe8b 100644 --- a/flash-src/WebSocket.as +++ b/flash-src/WebSocket.as @@ -162,7 +162,8 @@ public class WebSocket extends EventDispatcher { tlsSocket.startTLS(rawSocket, host, tlsConfig); } - var hostValue:String = host + (port == 80 ? "" : ":" + port); + var defaultPort:int = scheme == "wss" ? 443 : 80; + var hostValue:String = host + (port == defaultPort ? "" : ":" + port); var key1:String = generateKey(); var key2:String = generateKey(); var key3:String = generateKey3(); |