From 891fa50e554963ef7cf236b087cfbedfaf19849e Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sun, 9 Aug 2015 22:15:58 +0200 Subject: move code to netlib --- examples/ignore_websocket.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3