aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-24 14:58:18 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-24 14:58:18 +1200
commitefa98d514c6a8b6670d808f2bddb7158a6741ff0 (patch)
tree9146c6d9ed5e7f4e00b719818d58c9d1933f1089 /libmproxy
parentc8d2b2594bd38d988c387073ac5cfe62cf05122e (diff)
downloadmitmproxy-efa98d514c6a8b6670d808f2bddb7158a6741ff0.tar.gz
mitmproxy-efa98d514c6a8b6670d808f2bddb7158a6741ff0.tar.bz2
mitmproxy-efa98d514c6a8b6670d808f2bddb7158a6741ff0.zip
Docs and comments for WSGI app example.
Diffstat (limited to 'libmproxy')
-rw-r--r--libmproxy/wsgi.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmproxy/wsgi.py b/libmproxy/wsgi.py
index 8844ea3e..9fb5f0c5 100644
--- a/libmproxy/wsgi.py
+++ b/libmproxy/wsgi.py
@@ -104,13 +104,17 @@ class WSGIAdaptor:
except Exception, v:
pass
return errs.getvalue()
-
+
class AppRegistry:
def __init__(self):
self.apps = {}
def add(self, app, domain, port):
+ """
+ Add a WSGI app to the registry, to be served for requests to the
+ specified domain, on the specified port.
+ """
self.apps[(domain, port)] = WSGIAdaptor(app, domain, port)
def get(self, request):