From 7e12c8a6a24290c39abd56c9bb380f2d711cf503 Mon Sep 17 00:00:00 2001 From: Hiroshi Ichikawa Date: Sat, 17 Sep 2011 21:19:48 +0900 Subject: Switching to hybi-10 protocol. --- README.md | 7 +++---- WebSocketMain.swf | Bin 175657 -> 175657 bytes WebSocketMainInsecure.zip | Bin 166443 -> 166388 bytes flash-src/src/net/gimite/websocket/WebSocket.as | 6 +++--- .../src/net/gimite/websocket/WebSocketMain.as | 2 -- .../net/gimite/websocket/WebSocketMainInsecure.as | 2 -- web_socket.js | 2 +- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bb6db68..2bd8e46 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Note that it's technically possible that client sends arbitrary string as Cookie ### Proxy support -[The WebSocket spec](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07) specifies instructions for User Agents to support proxied connections by implementing the HTTP CONNECT method. +[The WebSocket spec](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10) specifies instructions for User Agents to support proxied connections by implementing the HTTP CONNECT method. The AS3 Socket class doesn't implement this mechanism, which renders it useless for the scenarios where the user trying to open a socket is behind a proxy. @@ -149,9 +149,8 @@ Install [Flex 4 SDK](http://opensource.adobe.com/wiki/display/flexsdk/Download+F ## WebSocket protocol versions -- web-socket-js supports [Hixie 76 version](http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76) of WebSocket protocol by default i.e. in [master branch](https://github.com/gimite/web-socket-js). -- If you want to try newer [Hybi 07 version](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07), check out from [hybi-07 branch](https://github.com/gimite/web-socket-js/tree/hybi-07). This will become the master branch in the future, probably when Chrome switches to Hybi 07. -- Hixie 75 or before is no longer supported. +- web-socket-js supports [Hybi 10 version](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10) of WebSocket protocol. +- Hixie 76 or before is no longer supported. ## License diff --git a/WebSocketMain.swf b/WebSocketMain.swf index 2a6d6a4..a31f6cc 100644 Binary files a/WebSocketMain.swf and b/WebSocketMain.swf differ diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip index 5ce4cdb..4d48641 100644 Binary files a/WebSocketMainInsecure.zip and b/WebSocketMainInsecure.zip differ diff --git a/flash-src/src/net/gimite/websocket/WebSocket.as b/flash-src/src/net/gimite/websocket/WebSocket.as index d849c1e..a244450 100644 --- a/flash-src/src/net/gimite/websocket/WebSocket.as +++ b/flash-src/src/net/gimite/websocket/WebSocket.as @@ -1,7 +1,7 @@ // Copyright: Hiroshi Ichikawa // License: New BSD License // Reference: http://dev.w3.org/html5/websockets/ -// Reference: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 +// Reference: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 package net.gimite.websocket { @@ -272,7 +272,7 @@ public class WebSocket extends EventDispatcher { "Connection: Upgrade\r\n" + "Sec-WebSocket-Key: {2}\r\n" + "Sec-WebSocket-Origin: {3}\r\n" + - "Sec-WebSocket-Version: 7\r\n" + + "Sec-WebSocket-Version: 8\r\n" + "Cookie: {4}\r\n" + "{5}" + "\r\n", @@ -389,7 +389,7 @@ public class WebSocket extends EventDispatcher { onError( "The WebSocket server speaks old WebSocket protocol, " + "which is not supported by web-socket-js. " + - "It requires WebSocket protocol HyBi 7. " + + "It requires WebSocket protocol HyBi 10. " + "Try newer version of the server if available."); return false; } diff --git a/flash-src/src/net/gimite/websocket/WebSocketMain.as b/flash-src/src/net/gimite/websocket/WebSocketMain.as index 767e7ca..015fd54 100644 --- a/flash-src/src/net/gimite/websocket/WebSocketMain.as +++ b/flash-src/src/net/gimite/websocket/WebSocketMain.as @@ -1,7 +1,5 @@ // Copyright: Hiroshi Ichikawa // License: New BSD License -// Reference: http://dev.w3.org/html5/websockets/ -// Reference: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 package net.gimite.websocket { diff --git a/flash-src/src/net/gimite/websocket/WebSocketMainInsecure.as b/flash-src/src/net/gimite/websocket/WebSocketMainInsecure.as index 214f31e..7a368a0 100644 --- a/flash-src/src/net/gimite/websocket/WebSocketMainInsecure.as +++ b/flash-src/src/net/gimite/websocket/WebSocketMainInsecure.as @@ -1,7 +1,5 @@ // Copyright: Hiroshi Ichikawa // License: New BSD License -// Reference: http://dev.w3.org/html5/websockets/ -// Reference: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 package net.gimite.websocket { diff --git a/web_socket.js b/web_socket.js index 6cbafd5..00a4b2f 100644 --- a/web_socket.js +++ b/web_socket.js @@ -1,7 +1,7 @@ // Copyright: Hiroshi Ichikawa // License: New BSD License // Reference: http://dev.w3.org/html5/websockets/ -// Reference: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 +// Reference: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 (function() { -- cgit v1.2.1