Dynamic registry for standard URL schemes
Categories
(Core :: Networking, enhancement, P3)
Tracking
()
People
(Reporter: irakli, Assigned: kershaw)
References
()
Details
(Whiteboard: [necko-triaged])
Attachments
(1 obsolete file)
As a fallout from Bug 1536744 it is no longer possible to implement an nsIProtocolHandler that supports standard URLs (In other words nsIProtocolHandler.URI_STD is no longer taken into account and newURI is no longer called). There for there is no longer possible to add custom protocols through extensions mechanism who's URLs would have notion of relative URLs or hostname / authority.
To restore that capability we should create a mutable (RWLock protected) data structure (Hashtable or Array) that extensions could register / unregister protocol schemes with that
NS_NewURI would consult to decide whether to use nsIStandardURL or nsSimpleURI.
| Reporter | ||
Comment 1•7 years ago
|
||
Bug 1559356 fixed this issue by checking against static list of list of protocols but we need a more general dynamic solution so we don't have to modify list per each extension.
| Reporter | ||
Comment 2•7 years ago
|
||
As a fallout from Bug 1536744 it is no longer possible to implement an nsIProtocolHandler that supports standard URLs (In other words nsIProtocolHandler.URI_STD is no longer taken into account and newURI is no longer called). There for there is no longer possible to add custom protocols through extensions mechanism who's URLs would have notion of relative URLs or hostname / authority.
To restore that capability we should create a mutable (RWLock protected) data structure (Hashtable or Array) that extensions could register / unregister protocol schemes with that
NS_NewURI would consult to decide whether to use nsIStandardURL or nsSimpleURI.
| Reporter | ||
Comment 3•7 years ago
|
||
I've attempted to write a patch for this, but my lack of C++ experience & gecko internals turned this straightforward task into a challenge. I have uploaded the patch which I did not succeed in finishing, in case someone wants to take over or mentor me to get it completed.
Updated•7 years ago
|
Comment 4•7 years ago
|
||
Bugbug thinks this bug is a enhancement, but please change it back in case of error.
| Reporter | ||
Comment 5•7 years ago
|
||
As per discussion at it appears that it maybe desired to some cross / protocol interactions e.g. between (ipns:// & ipfs://) it does not directly affects this, but it's worth considering as probably it would make sense to register interaction policies wherever schemes are registered.
Updated•3 years ago
|
Comment 6•2 years ago
|
||
This fix is no longer necessary as unknown schemes can be parsed with DefaultURI in a URL Standard compliant manner since bug 1603699.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•