aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/tools/web/master.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-11-23 22:35:07 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-11-23 22:35:07 +0100
commit45332006a3da246679e6043b4abee06cd3ba0636 (patch)
tree938bfacbd2c7329a4f9cb87c6d9f02c19d643fce /mitmproxy/tools/web/master.py
parentdc75605e463f064fce07a1a7bf23b16f66742cbb (diff)
downloadmitmproxy-45332006a3da246679e6043b4abee06cd3ba0636.tar.gz
mitmproxy-45332006a3da246679e6043b4abee06cd3ba0636.tar.bz2
mitmproxy-45332006a3da246679e6043b4abee06cd3ba0636.zip
mitmweb: 100% app test coverage, numerous fixes
Diffstat (limited to 'mitmproxy/tools/web/master.py')
-rw-r--r--mitmproxy/tools/web/master.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mitmproxy/tools/web/master.py b/mitmproxy/tools/web/master.py
index 453455f0..5457fb40 100644
--- a/mitmproxy/tools/web/master.py
+++ b/mitmproxy/tools/web/master.py
@@ -45,6 +45,8 @@ class WebMaster(master.Master):
self.events.sig_add.connect(self._sig_events_add)
self.events.sig_refresh.connect(self._sig_events_refresh)
+ self.options.changed.connect(self._sig_options_update)
+
self.addons.add(*addons.default_addons())
self.addons.add(self.view, self.events, intercept.Intercept())
self.app = app.Application(
@@ -101,6 +103,13 @@ class WebMaster(master.Master):
cmd="reset"
)
+ def _sig_options_update(self, options, updated):
+ app.ClientConnection.broadcast(
+ resource="settings",
+ cmd="update",
+ data={k: getattr(options, k) for k in updated}
+ )
+
def run(self): # pragma: no cover
iol = tornado.ioloop.IOLoop.instance()