Skip to content

Commit

Permalink
Merge pull request wulczer#4 from thomasvs/version-7
Browse files Browse the repository at this point in the history
Seems thata we can get away with claiming
we support WebSockets protocol version 7, too.
  • Loading branch information
wulczer committed Apr 2, 2012
2 parents 93ec1c8 + 585e4a9 commit 83b4466
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ def _clientHandshakeHybi(self):
plugged in and the connection will be estabilished.
"""
version = self._getOneHeader("Sec-WebSocket-Version")
# we only speak version 8 and 13 of the protocol
if version not in ("8", "13"):
# we only speak version 7, 8 and 13 of the protocol
if version not in ("7", "8", "13"):
self.setResponseCode(426, "Upgrade Required")
self.setHeader("Sec-WebSocket-Version", "8")
self.setHeader("Sec-WebSocket-Version", "7")
return self.finish()

key = self._getOneHeader("Sec-WebSocket-Key")
Expand Down

0 comments on commit 83b4466

Please sign in to comment.