LibURL: Remove default port handling for the IRC schemes

LibURL previously assigned a default port to the IRC schemes,
a carryover from SerenityOS where IRC is supported.

This behavior deviates from the URL Standard and affects URL parsing by
eliding an explicitly specified port when it matches the default (this
is considered a legacy behaviour of the web URL schemes). Remove the IRC
default port to restore spec-compliant behavior.
This commit is contained in:
Shannon Booth
2026-01-22 11:44:04 +01:00
committed by Shannon Booth
parent 5af269913e
commit b6969fb82d
Notes: github-actions[bot] 2026-02-06 11:04:44 +00:00
3 changed files with 28 additions and 13 deletions

View File

@@ -39,6 +39,7 @@
{ input: '', base: 'file:///test?test#test' },
{ input: '??a=b&c=d', base: 'http://example.org/foo/bar' },
{ input: 'http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF' },
{ input: 'irc://127.0.0.1:6667' },
];
for (url of urls) {