wrap long lines

This commit is contained in:
Thomas Kriechbaumer 2016-08-18 17:24:27 +02:00
parent 72811e20e0
commit ec370fbc02
2 changed files with 24 additions and 4 deletions

View File

@ -20,8 +20,20 @@ host_header_re = re.compile(r"^(?P<host>[^:]+|\[.+\])(?::(?P<port>\d+))?$")
class RequestData(message.MessageData): class RequestData(message.MessageData):
def __init__(self, first_line_format, method, scheme, host, port, path, http_version, headers=(), content=None, def __init__(
timestamp_start=None, timestamp_end=None): self,
first_line_format,
method,
scheme,
host,
port,
path,
http_version,
headers=(),
content=None,
timestamp_start=None,
timestamp_end=None
):
if isinstance(method, six.text_type): if isinstance(method, six.text_type):
method = method.encode("ascii", "strict") method = method.encode("ascii", "strict")
if isinstance(scheme, six.text_type): if isinstance(scheme, six.text_type):

View File

@ -17,8 +17,16 @@ from typing import Union # noqa
class ResponseData(message.MessageData): class ResponseData(message.MessageData):
def __init__(self, http_version, status_code, reason=None, headers=(), content=None, def __init__(
timestamp_start=None, timestamp_end=None): self,
http_version,
status_code,
reason=None,
headers=(),
content=None,
timestamp_start=None,
timestamp_end=None
):
if isinstance(http_version, six.text_type): if isinstance(http_version, six.text_type):
http_version = http_version.encode("ascii", "strict") http_version = http_version.encode("ascii", "strict")
if isinstance(reason, six.text_type): if isinstance(reason, six.text_type):