aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathoc.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-01-28 19:28:20 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-01-28 19:28:20 +0100
commitb994fb5a2753c4b6ceff75a9227880a0127c5a93 (patch)
tree0bdaa02c5fb43e963ad30c40513c37527f285e42 /libpathod/pathoc.py
parent1b566869de4d07d509fa2ead6b91486326a9e5a4 (diff)
downloadmitmproxy-b994fb5a2753c4b6ceff75a9227880a0127c5a93.tar.gz
mitmproxy-b994fb5a2753c4b6ceff75a9227880a0127c5a93.tar.bz2
mitmproxy-b994fb5a2753c4b6ceff75a9227880a0127c5a93.zip
adjust to signature changes in netlib.tcp
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r--libpathod/pathoc.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py
index 0769b43c..32ae8441 100644
--- a/libpathod/pathoc.py
+++ b/libpathod/pathoc.py
@@ -22,8 +22,8 @@ SSLVERSIONS = {
}
class Pathoc(tcp.TCPClient):
- def __init__(self, host, port, ssl=None, sni=None, sslversion=1, clientcert=None):
- tcp.TCPClient.__init__(self, host, port)
+ def __init__(self, address, ssl=None, sni=None, sslversion=1, clientcert=None):
+ tcp.TCPClient.__init__(self, address)
self.settings = dict(
staticdir = os.getcwd(),
unconstrained_file_access = True,
@@ -68,7 +68,7 @@ class Pathoc(tcp.TCPClient):
language.FileAccessDenied.
"""
r = language.parse_request(self.settings, spec)
- language.serve(r, self.wfile, self.settings, self.host)
+ language.serve(r, self.wfile, self.settings, self.address.host)
self.wfile.flush()
return Response(*http.read_response(self.rfile, r.method, None))
@@ -109,7 +109,7 @@ class Pathoc(tcp.TCPClient):
return
if explain:
- r = r.freeze(self.settings, self.host)
+ r = r.freeze(self.settings, self.address.host)
resp, req = None, None
if showreq:
@@ -117,7 +117,7 @@ class Pathoc(tcp.TCPClient):
if showresp:
self.rfile.start_log()
try:
- req = language.serve(r, self.wfile, self.settings, self.host)
+ req = language.serve(r, self.wfile, self.settings, self.address.host)
self.wfile.flush()
resp = http.read_response(self.rfile, r.method, None)
except http.HttpError, v: