Check if 'application/json; charset=utf-8'

pull/419/head
dgtlmoon 3 years ago
parent f4bc0aa2ba
commit cec24fe2c1

@ -107,7 +107,9 @@ class perform_site_check():
# return content().textfilter().jsonextract().checksumcompare() ? # return content().textfilter().jsonextract().checksumcompare() ?
update_obj['content-type'] = fetcher.headers.get('Content-Type', '').lower().strip() update_obj['content-type'] = fetcher.headers.get('Content-Type', '').lower().strip()
is_json = update_obj['content-type'] == 'application/json' # Could be 'application/json; charset=utf-8' etc
is_json = 'application/json' in update_obj['content-type']
is_text_or_html = 'text' in update_obj['content-type'] is_text_or_html = 'text' in update_obj['content-type']
is_binary = content_fetcher.supported_binary_type(update_obj['content-type']) is_binary = content_fetcher.supported_binary_type(update_obj['content-type'])

Loading…
Cancel
Save