aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/web/app.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-05-31 01:51:31 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-05-31 01:51:31 +0200
commitec92fca8c030fe5971a034a658033f70965b990a (patch)
treeef9a2049eeab539d13e1f9662fd51220ab4ee817 /libmproxy/web/app.py
parent0f8e8ee1ad667c8d747d5876f9b630ecbc01d7e9 (diff)
parenta05a70d8168a07c92b2a3ecbbb1958d85532efe3 (diff)
downloadmitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.gz
mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.bz2
mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.zip
Merge branch 'master' of github.com:mitmproxy/mitmproxy
Diffstat (limited to 'libmproxy/web/app.py')
-rw-r--r--libmproxy/web/app.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/libmproxy/web/app.py b/libmproxy/web/app.py
index 9582d97b..69341e76 100644
--- a/libmproxy/web/app.py
+++ b/libmproxy/web/app.py
@@ -27,7 +27,8 @@ class RequestHandler(tornado.web.RequestHandler):
@property
def json(self):
- if not self.request.headers.get("Content-Type").startswith("application/json"):
+ if not self.request.headers.get(
+ "Content-Type").startswith("application/json"):
return None
return json.loads(self.request.body)
@@ -67,8 +68,10 @@ class FiltHelp(RequestHandler):
commands=filt.help
))
+
class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler):
- connections = None # raise an error if inherited class doesn't specify its own instance.
+ # raise an error if inherited class doesn't specify its own instance.
+ connections = None
def open(self):
self.connections.add(self)
@@ -264,4 +267,4 @@ class Application(tornado.web.Application):
cookie_secret=os.urandom(256),
debug=debug,
)
- super(Application, self).__init__(handlers, **settings) \ No newline at end of file
+ super(Application, self).__init__(handlers, **settings)