Ignore charset in content-type

This commit is contained in:
swee 2024-11-11 23:13:55 -08:00
parent 0af5f1b9a1
commit 1e13a9381f

View file

@ -610,7 +610,7 @@ while True:
try:
e = get(i, headers=headers, timeout=10)
header = e.headers
content_type = header.get('content-type')
content_type = header.get('content-type').split(" ")[0]
content_len = header.get('Content-length')
if content_type in allowedparse:
if e.ok:
@ -627,7 +627,7 @@ while True:
elif i[:7] == "http://":
e = get(i, headers=headers, timeout=10)
header = e.headers
content_type = header.get('content-type')
content_type = header.get('content-type').split(" ")[0]
content_len = header.get('Content-length')
if content_type in allowedparse:
if e.ok: