diff options
Diffstat (limited to 'examples')
| -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 | 
