fix content-type check

This commit is contained in:
cottongin 2022-04-21 19:43:14 -05:00
parent ab874f32d9
commit 646a86d15e
No known key found for this signature in database
GPG Key ID: C0D8954A47DCB4ED

View File

@ -449,7 +449,7 @@ class SpiffyTitles(callbacks.Plugin):
print("too big bailing")
request.close()
return (generic_error, False)
if 'content-length' in request.headers:
if 'content-length' in request.headers and request.get('content-type', '') == "text/html":
if int(request.headers['content-length']) > size:
log.debug("SpiffyTitles: URL ignored due to exceeding content size")
return (generic_error, False)