summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wheeler <grintor@gmail.com>2021-03-29 15:19:06 -0400
committerGitHub <noreply@github.com>2021-03-29 15:19:06 -0400
commit331d601eb599a5a7be7588c98fa2da9d23fa89c5 (patch)
treed6bbae87796dff5407c14b5029242a9ac7b337f3
parent5ac7b3e3915621682212d84dd9b7d9a6fabf7221 (diff)
downloadwebsocket-client-331d601eb599a5a7be7588c98fa2da9d23fa89c5.tar.gz
Add support for permitting additional values in the "upgrade" and "connection" headers (#627)
-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: