try:
size = headers["Content-Length"]
except KeyError:
- size = len(content)
+ pass
try:
last_modified = headers["Last-Modified"]
if last_modified:
last_modified = parse_time(last_modified)
- else:
+
+ if not size: # Could be None from headers
size = len(content)
if last_modified: