aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-21 16:54:49 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-21 16:54:49 +1200
commitcd8fba1d70fa8c7f4f39267d13b65c1bf2ab1b31 (patch)
tree940d89c39a2e620df5672325608d3c9d7ec5d7d8 /libpathod/pathod.py
parentf88e899274b097317db496245758181b43c1d72a (diff)
downloadmitmproxy-cd8fba1d70fa8c7f4f39267d13b65c1bf2ab1b31.tar.gz
mitmproxy-cd8fba1d70fa8c7f4f39267d13b65c1bf2ab1b31.tar.bz2
mitmproxy-cd8fba1d70fa8c7f4f39267d13b65c1bf2ab1b31.zip
Finalize porting built-in web app to Flask.
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index edf6e03a..4f5fba22 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -35,6 +35,17 @@ class PathodHandler(tcp.BaseHandler):
ret = presp.serve(self.wfile)
if ret["disconnect"]:
self.close()
+
+ ret["request"] = dict(
+ path = path,
+ method = method,
+ headers = headers.lst,
+ #remote_address = self.request.connection.address,
+ #full_url = self.request.full_url(),
+ #query = self.request.query,
+ httpversion = httpversion,
+ #uri = self.request.uri,
+ )
self.server.add_log(ret)
else:
cc = wsgi.ClientConn(self.client_address)
@@ -60,6 +71,10 @@ class Pathod(tcp.TCPServer):
self.log = []
self.logid = 0
+ @property
+ def request_settings(self):
+ return {}
+
def handle_connection(self, request, client_address):
PathodHandler(request, client_address, self)