diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-05-28 19:31:43 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-28 19:31:43 -0700 |
commit | 85aa5da6e3b7d811d316ed692ecd40e5442abe02 (patch) | |
tree | 9758079672b57eb7b1ec544e4ae2c2227d3ae6fd /netlib | |
parent | b70663f434897c3830ac0ca4c972face484ce064 (diff) | |
download | mitmproxy-85aa5da6e3b7d811d316ed692ecd40e5442abe02.tar.gz mitmproxy-85aa5da6e3b7d811d316ed692ecd40e5442abe02.tar.bz2 mitmproxy-85aa5da6e3b7d811d316ed692ecd40e5442abe02.zip |
fix tests
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/http/headers.py | 2 | ||||
-rw-r--r-- | netlib/http/request.py | 2 | ||||
-rw-r--r-- | netlib/http/response.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 2caf8d51..6067ff5e 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -76,7 +76,7 @@ class Headers(MultiDict): For use with the "Set-Cookie" header, see :py:meth:`get_all`. """ - def __init__(self, fields=None, **headers): + def __init__(self, fields=(), **headers): """ Args: fields: (optional) list of ``(name, value)`` header byte tuples, diff --git a/netlib/http/request.py b/netlib/http/request.py index 5a528bf2..a6e2a5ef 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -19,7 +19,7 @@ host_header_re = re.compile(r"^(?P<host>[^:]+|\[.+\])(?::(?P<port>\d+))?$") class RequestData(MessageData): - def __init__(self, first_line_format, method, scheme, host, port, path, http_version, headers=None, content=None, + def __init__(self, first_line_format, method, scheme, host, port, path, http_version, headers=(), content=None, timestamp_start=None, timestamp_end=None): if not isinstance(headers, Headers): headers = Headers(headers) diff --git a/netlib/http/response.py b/netlib/http/response.py index 7d272e10..a6a5bf47 100644 --- a/netlib/http/response.py +++ b/netlib/http/response.py @@ -11,7 +11,7 @@ from .. import utils class ResponseData(MessageData): - def __init__(self, http_version, status_code, reason=None, headers=None, content=None, + def __init__(self, http_version, status_code, reason=None, headers=(), content=None, timestamp_start=None, timestamp_end=None): if not isinstance(headers, Headers): headers = Headers(headers) |