Merge pull request #544 from ryoqun/websocket-connection-header-case-sensitivity

Make the Websocket's connection header value case-insensitive
This commit is contained in:
Maximilian Hils 2015-04-08 01:23:54 +02:00
commit 0aa2fca25a
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ def done(context):
@concurrent
def response(context, flow):
if flow.response.headers.get_first("Connection", None) == "Upgrade":
value = flow.response.headers.get_first("Connection", None)
if value and value.upper() == "UPGRADE":
# We need to send the response manually now...
flow.client_conn.send(flow.response.assemble())
# ...and then delegate to tcp passthrough.