fix: Force UA so we dont try to re-cache in a loop.

pull/559/head
Raphaël Vinot 2022-12-07 15:14:33 +01:00
parent 3e7f1c3de9
commit d2b5605182
1 changed files with 1 additions and 3 deletions

View File

@ -311,11 +311,9 @@ class CapturesIndex(Mapping):
cache['url'] = har.root_url
cache['redirects'] = json.dumps(tree.redirects)
cache['incomplete_redirects'] = 0
cache['user_agent'] = har.root_user_agent if har.root_user_agent else 'No User Agent.'
if har.root_referrer:
cache['referer'] = har.root_referrer
if har.root_user_agent:
# NOTE: This should always be the case (?)
cache['user_agent'] = har.root_user_agent
except Har2TreeError as e:
cache['error'] = str(e)
else: