Closed
Bug 1942030
Opened 1 year ago
Closed 1 year ago
nsStandarURL.setHost("") is throws for URLTYPE_STANDARD
Categories
(Core :: Networking, defect, P2)
Core
Networking
Tracking
()
RESOLVED
FIXED
136 Branch
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: valentin, Assigned: valentin)
References
Details
(Whiteboard: [necko-triaged][necko-priority-next])
Attachments
(1 external file)
This was regressed by bug 996055.
/**
* blah:foo/bar => blah://foo/bar
* blah:/foo/bar => blah:///foo/bar
* blah://foo/bar => blah://foo/bar
* blah:///foo/bar => blah:///foo/bar
*/
const unsigned long URLTYPE_STANDARD = 1;
URLTYPE_STANDARD is defined as "may or may not have a hostname".
As such, it's weird that we may parse a URL without a hostname, set the hostname to something, but not be able to clear it.
The fix is to update the condition to only throw for URLTYPE_AUTHORITY here and update the test expectation
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e95cc87f0db1
nsStandarURL.setHost("") throws for URLTYPE_STANDARD r=necko-reviewers,kershaw
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/23fd0c10f9a7
nsStandarURL.setHost("") throws for URLTYPE_STANDARD r=necko-reviewers,kershaw
Comment 4•1 year ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox136:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•