aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-04-08 01:23:54 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-04-08 01:23:54 +0200
commit0aa2fca25aa5511c89653d876a39eec6e812e184 (patch)
tree31d9cd1bd75fdb44796debd3de4c979531d453f1
parent1a666bb5db83e1a5c1d82bddc5d59bb700a1502f (diff)
parent9674a0869c2a333f74178e305677259e7ac379c3 (diff)
downloadmitmproxy-0aa2fca25aa5511c89653d876a39eec6e812e184.tar.gz
mitmproxy-0aa2fca25aa5511c89653d876a39eec6e812e184.tar.bz2
mitmproxy-0aa2fca25aa5511c89653d876a39eec6e812e184.zip
Merge pull request #544 from ryoqun/websocket-connection-header-case-sensitivity
Make the Websocket's connection header value case-insensitive
-rw-r--r--examples/ignore_websocket.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/ignore_websocket.py b/examples/ignore_websocket.py
index 48093951..f7a94bdf 100644
--- a/examples/ignore_websocket.py
+++ b/examples/ignore_websocket.py
@@ -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.