diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-21 16:54:49 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-21 16:54:49 +1200 |
commit | cd8fba1d70fa8c7f4f39267d13b65c1bf2ab1b31 (patch) | |
tree | 940d89c39a2e620df5672325608d3c9d7ec5d7d8 /libpathod/pathod.py | |
parent | f88e899274b097317db496245758181b43c1d72a (diff) | |
download | mitmproxy-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.py | 15 |
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) |