diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-01-13 02:25:58 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-01-13 02:25:58 +0100 |
commit | 621807f69758556b44dfebfc713da2de1af60ea0 (patch) | |
tree | 4d062eec8b66acaf48089584e607b40fb217bcfb /libmproxy/proxy.py | |
parent | 24fc8ff2920c027ddba5445d037cde6cba4a807d (diff) | |
download | mitmproxy-621807f69758556b44dfebfc713da2de1af60ea0.tar.gz mitmproxy-621807f69758556b44dfebfc713da2de1af60ea0.tar.bz2 mitmproxy-621807f69758556b44dfebfc713da2de1af60ea0.zip |
add basic error handling
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r-- | libmproxy/proxy.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 6a2da7d2..39a13c08 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -88,14 +88,6 @@ class ServerConnection(tcp.TCPClient): except tcp.NetLibError, v: raise ProxyError(400, str(v)) - def send(self, request): - print "deprecated" - d = request._assemble() - if not d: - raise ProxyError(502, "Cannot transmit an incomplete request.") - self.wfile.write(d) - self.wfile.flush() - def finish(self): tcp.TCPClient.finish(self) self.timestamp_end = utils.timestamp() @@ -154,7 +146,7 @@ class ConnectionHandler: self.sni = None def handle(self): - self.log("connect") + self.log("clientconnect") self.channel.ask("clientconnect", self) try: @@ -188,7 +180,7 @@ class ConnectionHandler: self.log(str(e)) # FIXME: We need to persist errors - self.log("disconnect") + self.log("clientdisconnect") self.channel.tell("clientdisconnect", self) def _handle_ssl(self): |