aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-11-06 10:51:30 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-11-06 10:51:30 +1300
commita2a87695d32df6bcf31a0785496d8ca6e41423c8 (patch)
tree12edac26d74932e945f12bda64d924c28061a493 /libmproxy/flow.py
parent0fe83ce87bd1e3cf00fb06d2cc06e1bf3b0dbe85 (diff)
downloadmitmproxy-a2a87695d32df6bcf31a0785496d8ca6e41423c8.tar.gz
mitmproxy-a2a87695d32df6bcf31a0785496d8ca6e41423c8.tar.bz2
mitmproxy-a2a87695d32df6bcf31a0785496d8ca6e41423c8.zip
Reduce loop timeouts to improve mitmproxy responsiveness
Fixes #384
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r--libmproxy/flow.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index 6136ec1c..bd35e864 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -27,7 +27,12 @@ class AppRegistry:
Add a WSGI app to the registry, to be served for requests to the
specified domain, on the specified port.
"""
- self.apps[(domain, port)] = wsgi.WSGIAdaptor(app, domain, port, version.NAMEVERSION)
+ self.apps[(domain, port)] = wsgi.WSGIAdaptor(
+ app,
+ domain,
+ port,
+ version.NAMEVERSION
+ )
def get(self, request):
"""
@@ -72,7 +77,8 @@ class ReplaceHooks:
def get_specs(self):
"""
- Retrieve the hook specifcations. Returns a list of (fpatt, rex, s) tuples.
+ Retrieve the hook specifcations. Returns a list of (fpatt, rex, s)
+ tuples.
"""
return [i[:3] for i in self.lst]
@@ -119,7 +125,8 @@ class SetHeaders:
def get_specs(self):
"""
- Retrieve the hook specifcations. Returns a list of (fpatt, rex, s) tuples.
+ Retrieve the hook specifcations. Returns a list of (fpatt, rex, s)
+ tuples.
"""
return [i[:3] for i in self.lst]