HTTP Fetcher code improvements

This commit is contained in:
dgtlmoon
2022-04-12 08:36:08 +02:00
committed by GitHub
parent 4074fe53f1
commit 34a87c0f41

View File

@@ -46,9 +46,6 @@ class perform_site_check():
if 'Accept-Encoding' in request_headers and "br" in request_headers['Accept-Encoding']:
request_headers['Accept-Encoding'] = request_headers['Accept-Encoding'].replace(', br', '')
# @todo check the failures are really handled how we expect
else:
timeout = self.datastore.data['settings']['requests']['timeout']
url = self.datastore.get_val(uuid, 'url')
request_body = self.datastore.get_val(uuid, 'body')
@@ -124,6 +121,7 @@ class perform_site_check():
"application"].get(
"render_anchor_tag_content", False)
)
# Re #340 - return the content before the 'ignore text' was applied
text_content_before_ignored_filter = stripped_text_from_html.encode('utf-8')