diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-12-10 00:47:05 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-12-10 00:47:05 +0100 |
commit | e12bf19e35867f3ea69f45054decb024a75fc2b4 (patch) | |
tree | 8201f5fd9f07d46a1a659bdfa93b2176066f4961 /libmproxy/web/app.py | |
parent | 05bc7e8cd8382aabdd44f7bc569d2fd421c26f21 (diff) | |
download | mitmproxy-e12bf19e35867f3ea69f45054decb024a75fc2b4.tar.gz mitmproxy-e12bf19e35867f3ea69f45054decb024a75fc2b4.tar.bz2 mitmproxy-e12bf19e35867f3ea69f45054decb024a75fc2b4.zip |
web: add event store, fix all those bugs
Diffstat (limited to 'libmproxy/web/app.py')
-rw-r--r-- | libmproxy/web/app.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py index d5638c10..31cb3ef1 100644 --- a/libmproxy/web/app.py +++ b/libmproxy/web/app.py @@ -35,7 +35,13 @@ class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler): class Flows(tornado.web.RequestHandler): def get(self): self.write(dict( - flows=[f.get_state(short=True) for f in self.application.state.flows] + list=[f.get_state(short=True) for f in self.application.state.flows] + )) + +class Events(tornado.web.RequestHandler): + def get(self): + self.write(dict( + list=list(self.application.state.events) )) @@ -54,6 +60,7 @@ class Application(tornado.web.Application): handlers = [ (r"/", IndexHandler), (r"/updates", ClientConnection), + (r"/events", Events), (r"/flows", Flows), (r"/flows/clear", FlowClear), ] |