diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-10-25 16:20:23 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-10-25 16:20:23 +1300 |
commit | 6d8431ab3e96568b3579a85e680371fd20c961aa (patch) | |
tree | 35ad1bee42e306692496b7b92808cb9d80c12c4e /libpathod/pathoc.py | |
parent | d4e6c25d45f680df4f807805ce878b498a5fb0c5 (diff) | |
download | mitmproxy-6d8431ab3e96568b3579a85e680371fd20c961aa.tar.gz mitmproxy-6d8431ab3e96568b3579a85e680371fd20c961aa.tar.bz2 mitmproxy-6d8431ab3e96568b3579a85e680371fd20c961aa.zip |
Allow specification of multiple patterns from file and on command line
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index ae1e98cf..b9b202eb 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -18,8 +18,17 @@ class SSLInfo: class Response: - def __init__(self, httpversion, status_code, msg, headers, content, sslinfo): - self.httpversion, self.status_code, self.msg = httpversion, status_code, msg + def __init__( + self, + httpversion, + status_code, + msg, + headers, + content, + sslinfo + ): + self.httpversion, self.status_code = httpversion, status_code + self.msg = msg self.headers, self.content = headers, content self.sslinfo = sslinfo @@ -91,7 +100,7 @@ class Pathoc(tcp.TCPClient): May raise language.ParseException, netlib.http.HttpError or language.FileAccessDenied. """ - r = language.parse_request(spec) + r = language.parse_requests(spec)[0] language.serve(r, self.wfile, self.settings, self.address.host) self.wfile.flush() ret = list(http.read_response(self.rfile, r.method.string(), None)) |