From 04fd789a677a84b3c908bb8ac02413d16271d5fb Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Wed, 6 May 2015 13:49:13 -0400 Subject: Update Tests and Test Plugins This commit updates the unit tests to work with the current code and adds in tests for the auth and token plugin functionality. --- websockify/websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'websockify/websocket.py') diff --git a/websockify/websocket.py b/websockify/websocket.py index 20305b8..727413a 100644 --- a/websockify/websocket.py +++ b/websockify/websocket.py @@ -790,7 +790,7 @@ class WebSocketServer(object): handshake = sock.recv(1024, socket.MSG_PEEK) #self.msg("Handshake [%s]" % handshake) - if handshake == "": + if not handshake: raise self.EClose("ignoring empty handshake") elif handshake.startswith(s2b("")): -- cgit v1.2.1