summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-10-13 17:35:03 +0200
committerLars-Dominik Braun <lars@6xq.net>2019-10-13 17:35:03 +0200
commitf800211fb5d0755f6d1800fd4b830e78b050c0d7 (patch)
treeef0908e00859e9b730c0b9264fa07ef338e3a898 /crocoite
parentd5b42bf459545d4b73933a4b0be5306c3a3189c6 (diff)
downloadcrocoite-f800211fb5d0755f6d1800fd4b830e78b050c0d7.tar.gz
crocoite-f800211fb5d0755f6d1800fd4b830e78b050c0d7.tar.bz2
crocoite-f800211fb5d0755f6d1800fd4b830e78b050c0d7.zip
browser: Work around missing responseReceived events
Looks like Chrome extensively reuses request ids now. Sucks, since we relied on their uniqueness. For now ignore requests without a dedicated responseReceived event. See issue #24.
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/browser.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/crocoite/browser.py b/crocoite/browser.py
index dc67c51..3518789 100644
--- a/crocoite/browser.py
+++ b/crocoite/browser.py
@@ -443,6 +443,13 @@ class SiteLoader:
if item is None:
# we never recorded this request (blacklisted scheme, for example)
return
+ if not item.response:
+ # chrome failed to send us a responseReceived event for this item,
+ # so we can’t record it (missing request/response headers)
+ self.logger.error ('response missing',
+ uuid='fac3ab96-3f9b-4c5a-95c7-f83b675cdcb9', requestId=item.id)
+ return
+
req = item.request
if item.url.scheme in self.allowedSchemes:
item.fromLoadingFinished (kwargs)