diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-09-28 11:38:49 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-09-28 11:38:49 +1200 |
commit | 8bb81be2b07b4b93a8ec7c088bf1ff4728fcec21 (patch) | |
tree | 97bbb135e6c9241d7b79bafec92347150aa2e984 /libpathod/pathoc.py | |
parent | 65108ed4290399be7abbc58662cdc6d4f9371142 (diff) | |
download | mitmproxy-8bb81be2b07b4b93a8ec7c088bf1ff4728fcec21.tar.gz mitmproxy-8bb81be2b07b4b93a8ec7c088bf1ff4728fcec21.tar.bz2 mitmproxy-8bb81be2b07b4b93a8ec7c088bf1ff4728fcec21.zip |
Add pathoc -T to ignore timeouts.
Also move -c to -C for consistency.
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index 90f3b98b..7551c589 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -38,7 +38,7 @@ class Pathoc(tcp.TCPClient): print >> fp, "%s (unprintables escaped):"%header print >> fp, netlib.utils.cleanBin(data) - def print_request(self, spec, showreq, showresp, explain, hexdump, ignorecodes, fp=sys.stdout): + def print_request(self, spec, showreq, showresp, explain, hexdump, ignorecodes, ignoretimeout, fp=sys.stdout): """ Performs a series of requests, and prints results to the specified file descriptor. @@ -74,6 +74,8 @@ class Pathoc(tcp.TCPClient): except http.HttpError, v: print >> fp, "<< HTTP Error:", v.msg except tcp.NetLibTimeout: + if ignoretimeout: + return print >> fp, "<<", "Timeout" except tcp.NetLibDisconnect: # pragma: nocover print >> fp, "<<", "Disconnect" |