From 7b496ce5bcc7575a36603b09b7db0248cbf516e7 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 4 Aug 2011 11:09:12 -0500 Subject: [PATCH] Clarify that we support HyBi 07-10. HyBi 07 reports version 7 in the handshake. HyBi 08-10 report version 8 in the handshake. Remove version 9 since that is not yet actually defined. --- README.md | 6 +++--- websocket.py | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 906bc6b..8b0ccaf 100644 --- a/README.md +++ b/README.md @@ -132,19 +132,19 @@ implementations: no yes - Hixie 75 + [Hixie 75](http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75) yes yes yes no - Hixie 76 + [Hixie 76](http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76) yes yes yes yes - IETF/HyBi 07 + [IETF/HyBi 07-10](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10) yes no no diff --git a/websocket.py b/websocket.py index 36f64ef..6b49ee0 100644 --- a/websocket.py +++ b/websocket.py @@ -8,7 +8,7 @@ Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3) Supports following protocol versions: - http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 - http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76 - - http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 + - http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 You can make a cert/key with openssl using: openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem @@ -615,7 +615,9 @@ Sec-WebSocket-Accept: %s\r if sys.hexversion < 0x2060000 or not numpy: raise self.EClose("Python >= 2.6 and numpy module is required for HyBi-07 or greater") - if ver in ['7', '8', '9']: + # HyBi-07 report version 7 + # HyBi-08 - HyBi-10 report version 8 + if ver in ['7', '8']: self.version = "hybi-0" + ver else: raise self.EClose('Unsupported protocol version %s' % ver)