summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeuman Vong <neuman@twilio.com>2011-04-28 16:59:32 -0700
committerNeuman Vong <neuman@twilio.com>2011-04-28 16:59:32 -0700
commit0e76f927c0f576e1068b58afe6026d6faf6fcaf1 (patch)
treeb2444d190e62f1b9b0c7de31974ed471dd41aebf
parent3ab0e24c3580ba263cc48760a91aa0bf90b70e6b (diff)
downloadweb-socket-js-0e76f927c0f576e1068b58afe6026d6faf6fcaf1.tar.gz
Only set port in Host if not default port
-rw-r--r--WebSocketMain.swfbin175746 -> 175753 bytes
-rw-r--r--WebSocketMainInsecure.zipbin166589 -> 166462 bytes
-rw-r--r--flash-src/WebSocket.as3
3 files changed, 2 insertions, 1 deletions
diff --git a/WebSocketMain.swf b/WebSocketMain.swf
index 7561215..0fb5449 100644
--- a/WebSocketMain.swf
+++ b/WebSocketMain.swf
Binary files differ
diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip
index c02a249..691f84c 100644
--- a/WebSocketMainInsecure.zip
+++ b/WebSocketMainInsecure.zip
Binary files 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();