Make the Websocket's connection header value case-insensitive

This commit is contained in:
Ryo Onodera 2015-03-31 16:07:04 +09:00
parent 44fb42185f
commit 9674a0869c

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.