aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-09 22:15:58 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-10 21:04:17 +0200
commit891fa50e554963ef7cf236b087cfbedfaf19849e (patch)
treef6d0347829b3cc7d35027083655b0de3762cef74 /examples
parenta10c31c6984f9b6646d2a7bad05ace912ea152a7 (diff)
downloadmitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.tar.gz
mitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.tar.bz2
mitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.zip
move code to netlib
Diffstat (limited to 'examples')
-rw-r--r--examples/ignore_websocket.py11
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