Closed Bug 1561860 Opened 5 years ago Closed 4 years ago

Add rust-url based nsIURI implementation

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

In bug 1559356 we hardcoded dweb to be an nsStandardURL for the only reason that we want it to have a host - and nsSimpleURI doesn't have one. We do the same for ssh URLs.
Making nsSimpleURI::GetHost work properly has a potential for regressions and security issues - see comment

As such, it is better to add a new nsIURI implementation that is backed by rust-url/MozURL and have that working properly. In time we can migrate more of our special nsIURI implementations to that.

Last I checked, rust-url had certain performance issues when compared to nsSimpleURI/nsStandardURL, but using it just for unknown schemes seems OK since that would be quite rare. We can address the performance issues in time, as we move more schemes to use it.

This patch adds DefaultURI which wraps MozURL which in turn forwards calls
to rust-url.
For the moment the added network.url.useDefaultURI is set to false by default.
The plan is to make this the default implementation for unknown URI types.

Assignee: nobody → valentin.gosu
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f15d18181e8c
Add rust-url based nsIURI implementation r=JuniorHsu
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Blocks: 1603699
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: