diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-22 17:01:06 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-22 17:01:06 +0200 |
commit | 4167713cc01aa8e7b0cbeca04160db559a2dcc11 (patch) | |
tree | f4573c658c674cfc1f214ab4999fee3aad940b26 /libmproxy/protocol | |
parent | 45f39c23804e12459e810a1f5014d892e4177b48 (diff) | |
download | mitmproxy-4167713cc01aa8e7b0cbeca04160db559a2dcc11.tar.gz mitmproxy-4167713cc01aa8e7b0cbeca04160db559a2dcc11.tar.bz2 mitmproxy-4167713cc01aa8e7b0cbeca04160db559a2dcc11.zip |
fix timestamp formatting: end_time may not be set
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r-- | libmproxy/protocol/http.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index a5d43802..de5f9950 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -89,6 +89,7 @@ class HTTPMessage(stateobject.StateObject): """ Base class for HTTPRequest and HTTPResponse """ + def __init__(self, httpversion, headers, content, timestamp_start=None, timestamp_end=None): self.httpversion = httpversion @@ -917,6 +918,7 @@ class HTTPHandler(ProtocolHandler): HTTPHandler implements mitmproxys understanding of the HTTP protocol. """ + def __init__(self, c): super(HTTPHandler, self).__init__(c) self.expected_form_in = c.config.mode.http_form_in @@ -980,8 +982,8 @@ class HTTPHandler(ProtocolHandler): body_size_limit=self.c.config.body_size_limit ) except tcp.NetLibDisconnect: - # don't throw an error for disconnects that happen - # before/between requests. + # don't throw an error for disconnects that happen + # before/between requests. return False self.c.log( "request", |