diff options
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r-- | libmproxy/protocol/http.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 26a94040..b32a55ed 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -117,7 +117,10 @@ class HTTPMessage(stateobject.StateObject): def get_state(self, short=False): ret = super(HTTPMessage, self).get_state(short) if short: - ret["contentLength"] = len(self.content) + if self.content: + ret["contentLength"] = len(self.content) + else: + ret["contentLength"] = 0 return ret def get_decoded_content(self): |