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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 9db50cd7..644d4696 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -108,6 +108,12 @@ class HTTPMessage(stateobject.StateObject):
)
_stateobject_long_attributes = {"content"}
+ def get_state(self, short=False):
+ ret = super(HTTPMessage, self).get_state(short)
+ if short:
+ ret["contentLength"] = len(self.content)
+ return ret
+
def get_decoded_content(self):
"""
Returns the decoded content based on the current Content-Encoding