aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r--libmproxy/protocol/http.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 852ce393..8d703786 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -691,7 +691,10 @@ class HTTPResponse(HTTPMessage):
return f
def __repr__(self):
- size = utils.pretty_size(len(self.content)) if self.content else "content missing"
+ if self.content:
+ size = netlib.utils.pretty_size(len(self.content))
+ else:
+ size = "content missing"
return "<HTTPResponse: {code} {msg} ({contenttype}, {size})>".format(
code=self.code,
msg=self.msg,