summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--websocket/_handshake.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/websocket/_handshake.py b/websocket/_handshake.py
index 6c93f7c..1876919 100644
--- a/websocket/_handshake.py
+++ b/websocket/_handshake.py
@@ -177,8 +177,8 @@ def _validate(headers, key, subprotocols):
r = headers.get(k, None)
if not r:
return False, None
- r = r.lower()
- if v != r:
+ r = [x.strip().lower() for x in r.split(',')]
+ if v not in r:
return False, None
if subprotocols: