Make it possible to log which extension cancels a network request
Categories
(Core :: Networking, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: kershaw, Assigned: mleclair)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
See bug 1698289 #comment 12.
Sometimes a page doesn't load well because some web extension cancels a http request, but we don't know which extension is the culprit from the http log.
It'd be nice if we can add the information here to http log.
Comment 1•2 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #0)
See bug 1698289 #comment 12.
Sometimes a page doesn't load well because some web extension cancels a http request, but we don't know which extension is the culprit from the http log.
It'd be nice if we can add the information here to http log.
A reason code and the addon id of the extension blocking a request is actually already being associated to the related channel here in WebRequest.jsm:
If a channel was blocked because of an extension webRequest listener then channel.loadInfo.requestBlockingReason
is going to be set to Ci.nsILoadInfo.BLOCKING_REASON_EXTENSION_WEBREQUEST
.
The add-on id is stored in the property bag as "cancelledByExtension", e.g. it seems that (besides using it to make it visible in the DevTools network panel) we are using it also to improve the error we show for that in download blocked by addons (introdued in Bug 1681642):
Do you think there is anything missing (or not easily accessible from where we would like to have it available) or is this bug already covered and could be closed (e.g. as a duplicate of the bug that started to collect and associate these details to the related channel)?
Reporter | ||
Comment 2•2 years ago
|
||
Thanks for the information. I think the cancelledByExtension
property is enough.
I'll move this bug back to necko.
This is what I think we should do:
- Check if
LOG
is enabled - If yes, call
getProperty("cancelledByExtension")
to get the extension id. - Log the extension id.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Pushed by mleclair@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ff2747035a5c Added extension id to http log to know which extension cancels a network request r=kershaw,necko-reviewers
Comment 5•2 years ago
|
||
bugherder |
Description
•