[web] new maximal downloaded size: 512k (old: 200k)
This commit is contained in:
parent
c691450111
commit
463faed697
@ -99,10 +99,10 @@ def getURLContent(url, timeout=15):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
res = conn.getresponse()
|
res = conn.getresponse()
|
||||||
size = int(res.getheader("Content-Length", 200000))
|
size = int(res.getheader("Content-Length", 524288))
|
||||||
cntype = res.getheader("Content-Type")
|
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
|
return None
|
||||||
|
|
||||||
data = res.read(size)
|
data = res.read(size)
|
||||||
|
Loading…
Reference in New Issue
Block a user