structure components

This commit is contained in:
Maximilian Hils
2015-03-21 22:49:51 +01:00
parent ac5d74d42c
commit 02a61ea45d
9 changed files with 877 additions and 831 deletions

View File

@@ -119,6 +119,8 @@ class HTTPMessage(stateobject.StateObject):
if short:
if self.content:
ret["contentLength"] = len(self.content)
elif self.content == CONTENT_MISSING:
ret["contentLength"] = None
else:
ret["contentLength"] = 0
return ret