mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 14:48:15 +00:00
This was resulting in the incorrect host serialization of: http://[0:1:0:1:0:1:0:1] to [::1:0:1:0:1:0:1] and: http://[1:0:1:0:1:0:1:0] to [1::1:0:1:0:1:0]
26 lines
799 B
HTML
26 lines
799 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
function printURL(input) {
|
|
println(input);
|
|
const url = new URL(input);
|
|
println(`protocol => '${url.protocol}'`);
|
|
println(`username => '${url.username}'`);
|
|
println(`password => '${url.password}'`);
|
|
println(`host => '${url.host}'`);
|
|
println(`hostname => '${url.hostname}'`);
|
|
println(`port => '${url.port}'`);
|
|
println(`pathname => '${url.pathname}'`);
|
|
println(`search => '${url.search}'`);
|
|
}
|
|
|
|
for (url of [
|
|
'ftp://serenityos.org:21',
|
|
'http://[0:1:0:1:0:1:0:1]',
|
|
'http://[1:0:1:0:1:0:1:0]',
|
|
]) {
|
|
printURL(url);
|
|
}
|
|
});
|
|
</script>
|