mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
fix #344
This commit is contained in:
parent
6ebf488c5b
commit
4781c565a9
@ -638,11 +638,12 @@ class HTTPResponse(HTTPMessage):
|
||||
return f
|
||||
|
||||
def __repr__(self):
|
||||
size = utils.pretty_size(len(self.content)) if self.content else "content missing"
|
||||
return "<HTTPResponse: {code} {msg} ({contenttype}, {size})>".format(
|
||||
code=self.code,
|
||||
msg=self.msg,
|
||||
contenttype=self.headers.get_first("content-type", "?"),
|
||||
size=utils.pretty_size(len(self.content))
|
||||
contenttype=self.headers.get_first("content-type", "unknown content type"),
|
||||
size=size
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user