[web] new maximal downloaded size: 512k (old: 200k)

This commit is contained in:
nemunaire 2014-12-20 08:26:32 +01:00
parent c691450111
commit 463faed697

View File

@ -99,10 +99,10 @@ def getURLContent(url, timeout=15):
try:
res = conn.getresponse()
size = int(res.getheader("Content-Length", 200000))
size = int(res.getheader("Content-Length", 524288))
cntype = res.getheader("Content-Type")
if size > 200000 or (cntype is not None and cntype[:4] != "text" and cntype[:4] != "appl"):
if size > 524288 or (cntype is not None and cntype[:4] != "text" and cntype[:4] != "appl"):
return None
data = res.read(size)