Fix null content length

This commit is contained in:
Vasily Zubarev
2020-01-07 16:22:26 +01:00
parent dc91a89b4c
commit e063972349

View File

@@ -178,7 +178,8 @@ def resolve_url(entry):
url = response.headers["location"]
else:
content_type = response.headers.get("content-type")
content_length = response.headers.get("content-length")
content_length = int(response.headers.get("content-length")
or MAX_PARSABLE_CONTENT_LENGTH + 1)
break
return url, content_type, content_length