From 0e76f927c0f576e1068b58afe6026d6faf6fcaf1 Mon Sep 17 00:00:00 2001 From: Neuman Vong Date: Thu, 28 Apr 2011 16:59:32 -0700 Subject: Only set port in Host if not default port --- WebSocketMain.swf | Bin 175746 -> 175753 bytes WebSocketMainInsecure.zip | Bin 166589 -> 166462 bytes flash-src/WebSocket.as | 3 ++- 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WebSocketMain.swf b/WebSocketMain.swf index 7561215..0fb5449 100644 Binary files a/WebSocketMain.swf and b/WebSocketMain.swf differ diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip index c02a249..691f84c 100644 Binary files a/WebSocketMainInsecure.zip and b/WebSocketMainInsecure.zip differ 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(); -- cgit v1.2.1