diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-03-07 13:46:02 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-03-07 13:46:02 +1300 |
commit | 765871bd118926dfb265f2b8f67cfd2b3558d6ee (patch) | |
tree | 9709a617a5a4ac163576b57313d2c5d33edd3ca1 /libmproxy/proxy.py | |
parent | 64cce94238efd4cc869f19b198c72361c9c8c6c9 (diff) | |
download | mitmproxy-765871bd118926dfb265f2b8f67cfd2b3558d6ee.tar.gz mitmproxy-765871bd118926dfb265f2b8f67cfd2b3558d6ee.tar.bz2 mitmproxy-765871bd118926dfb265f2b8f67cfd2b3558d6ee.zip |
Store timestamps on flow components as a UTC time tuple.
Format is:
(tm_year,tm_mon,tm_mday,tm_hour,tm_min, tm_sec,tm_wday,tm_yday,tm_isdst)
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r-- | libmproxy/proxy.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 2a2904e5..a4dc3e69 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -5,7 +5,7 @@ Development started from Neil Schemenauer's munchy.py """ -import sys, os, time, string, socket, urlparse, re, select, copy, base64 +import sys, os, string, socket, urlparse, re, select, copy, base64 import shutil, tempfile import optparse, SocketServer, ssl import utils, controller @@ -132,7 +132,7 @@ class Request(controller.Msg): self.client_conn = client_conn self.host, self.port, self.scheme = host, port, scheme self.method, self.path, self.headers, self.content = method, path, headers, content - self.timestamp = timestamp or time.time() + self.timestamp = timestamp or utils.timestamp() self.close = False controller.Msg.__init__(self) @@ -262,7 +262,7 @@ class Response(controller.Msg): self.request = request self.code, self.msg = code, msg self.headers, self.content = headers, content - self.timestamp = timestamp or time.time() + self.timestamp = timestamp or utils.timestamp() self.cached = False controller.Msg.__init__(self) self.replay = False @@ -376,7 +376,7 @@ class ClientConnect(controller.Msg): class Error(controller.Msg): def __init__(self, request, msg, timestamp=None): self.request, self.msg = request, msg - self.timestamp = timestamp or time.time() + self.timestamp = timestamp or utils.timestamp() controller.Msg.__init__(self) def load_state(self, state): |