diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-12-23 20:33:42 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-12-23 20:33:42 +0100 |
commit | 2861d99de4d329bcba0a3c2193523398a22673c0 (patch) | |
tree | 0aa1a2aae666c2909285a6fd5049f2ef7d6d8ebc /libmproxy/protocol/http.py | |
parent | 459772a8ef79ac0adeaeba56577972e86074265e (diff) | |
download | mitmproxy-2861d99de4d329bcba0a3c2193523398a22673c0.tar.gz mitmproxy-2861d99de4d329bcba0a3c2193523398a22673c0.tar.bz2 mitmproxy-2861d99de4d329bcba0a3c2193523398a22673c0.zip |
web: intercept feature
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r-- | libmproxy/protocol/http.py | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index d3945579..c6e67498 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -882,7 +882,7 @@ class HTTPFlow(Flow): The following additional attributes are exposed: - intercepting: Is this flow currently being intercepted? + intercepted: Is this flow currently being intercepted? live: Does this flow have a live client connection? """ @@ -893,9 +893,6 @@ class HTTPFlow(Flow): self.response = None """@type: HTTPResponse""" - # FIXME: Should that rather be an attribute of Flow? - self.intercepting = False - _stateobject_attributes = Flow._stateobject_attributes.copy() _stateobject_attributes.update( request=HTTPRequest, @@ -942,30 +939,6 @@ class HTTPFlow(Flow): return f(self) return True - def kill(self, master): - """ - Kill this request. - """ - self.error = Error("Connection killed") - self.intercepting = False - self.reply(KILL) - self.reply = controller.DummyReply() - master.handle_error(self) - - def intercept(self): - """ - Intercept this Flow. Processing will stop until accept_intercept is - called. - """ - self.intercepting = True - - def accept_intercept(self): - """ - Continue with the flow - called after an intercept(). - """ - self.intercepting = False - self.reply() - def replace(self, pattern, repl, *args, **kwargs): """ Replaces a regular expression pattern with repl in both request and |