diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-08-11 11:59:37 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-08-11 11:59:37 +0200 |
commit | a9fcef868b369568163e19c73651c55ccea4604d (patch) | |
tree | f6d0347829b3cc7d35027083655b0de3762cef74 /examples/ignore_websocket.py | |
parent | a10c31c6984f9b6646d2a7bad05ace912ea152a7 (diff) | |
parent | 891fa50e554963ef7cf236b087cfbedfaf19849e (diff) | |
download | mitmproxy-a9fcef868b369568163e19c73651c55ccea4604d.tar.gz mitmproxy-a9fcef868b369568163e19c73651c55ccea4604d.tar.bz2 mitmproxy-a9fcef868b369568163e19c73651c55ccea4604d.zip |
Merge pull request #720 from Kriechi/cleanup
move code to netlib
Diffstat (limited to 'examples/ignore_websocket.py')
-rw-r--r-- | examples/ignore_websocket.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/ignore_websocket.py b/examples/ignore_websocket.py index bea7e565..57e11d5b 100644 --- a/examples/ignore_websocket.py +++ b/examples/ignore_websocket.py @@ -9,20 +9,21 @@ # `--ignore :80$` as an additional parameter. # (see http://mitmproxy.org/doc/features/passthrough.html) -from libmproxy.protocol.http import HTTPRequest +import netlib.http.semantics + from libmproxy.protocol.tcp import TCPHandler from libmproxy.protocol import KILL from libmproxy.script import concurrent def start(context, argv): - HTTPRequest._headers_to_strip_off.remove("Connection") - HTTPRequest._headers_to_strip_off.remove("Upgrade") + netlib.http.semantics.Request._headers_to_strip_off.remove("Connection") + netlib.http.semantics.Request._headers_to_strip_off.remove("Upgrade") def done(context): - HTTPRequest._headers_to_strip_off.append("Connection") - HTTPRequest._headers_to_strip_off.append("Upgrade") + netlib.http.semantics.Request._headers_to_strip_off.append("Connection") + netlib.http.semantics.Request._headers_to_strip_off.append("Upgrade") @concurrent |