Closed Bug 1648105 Opened 5 years ago Closed 5 years ago

Match paterns does not work with file:// scheme

Categories

(WebExtensions :: Request Handling, defect)

77 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1341341

People

(Reporter: thomas.benhamou, Unassigned)

Details

Attachments

(1 file)

472.78 KB, application/x-zip-compressed
Details
Attached file webex_demo.zip

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

I created a small demo web extension, attached to this post.

This web extension works but should log all requests in devtools according to this docs because i used the "<all_urls>" patern.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/onBeforeRequest

Actual results:

If you try to load a local file (with scheme "file://") the log function will not be called despite the "<all_urls>" directive

Expected results:

"file://" scheme should also trigger the log function.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/RequestFilter

urls array of string. An array of match patterns. The listener will only be called for requests whose targets match any of the given patterns. Only requests made using HTTP or HTTPS will trigger events, other protocols (such as data: and file:) supported by pattern matching do not trigger events.

PS. Your package contains a large .git directory of an unrelated (public) add-on. Probably not a problem now, but be careful with what you put in the zip file next time.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: