Closed Bug 1367478 Opened 7 years ago Closed 7 years ago

Support ws and wss protocols on the webRequest API

Categories

(WebExtensions :: Request Handling, enhancement, P2)

enhancement

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: rpl, Assigned: mixedpuppy)

References

Details

(Whiteboard: [triaged])

Attachments

(1 file)

WebExtensions addons may want to listen for webRequest related to websocket connections (which use the ws and wss as the protocol names), e.g. uBlock-Origin is one of these extensions:

- https://github.com/gorhill/uBlock/blob/ca32a693df510fb1018ecde2e8a2412f622aab3c/platform/chromium/vapi-background.js#L1099-L1119

Currently, when trying to add a webRequest listener using ws or wss urls in the event filters logs, the following errors are logged in the console:

- Invalid match pattern: 'ws://*/*'
- Invalid match pattern: 'wss://*/*'
- The webRequest.addListener filter doesn't overlap with host permissions
Blocks: 1309926
Assignee: nobody → mixedpuppy
Priority: -- → P2
Whiteboard: [triaged]
Websockets work fine in webrequest, the urls show up under http/s.  We could change the url for addons listening on websockets, but I wonder where else that url could end up being an issue.

In any case this waits on bug 1368102
Depends on: 1368102
Attachment #8875399 - Flags: review?(lgreco)
Comment on attachment 8875399 [details]
Bug 1367478 support websocket ws/wss protocol in matchpattern,

https://reviewboard.mozilla.org/r/146840/#review151538
Attachment #8875399 - Flags: review?(kmaglione+bmo) → review+
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/62e44a827308
support websocket ws/wss protocol in matchpattern, r=kmag
https://hg.mozilla.org/mozilla-central/rev/62e44a827308
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Attachment #8875399 - Flags: review?(lgreco)
Depends on: 1382834
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: