Closed
Description
Version
v14.16.0
Platform
Darwin Mac-Book-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Subsystem
url › node_url.cc
What steps will reproduce the bug?
It's not directly a bug I have encountered but while I was delving into Node's internal URL parser I have noticed that it diverges from the spec in some parts, specifically for kHost
and kHostname
. Here's an excerpt from the spec:
And here's what Node.js does:
Notice how the 2. step from the spec is all the way at the bottom which means that the host was already parsed and assigned to the URL whereas in the spec, if stateOverride === kHostname
then it returns early.
I wanted to ask if there is a reason why Node diverges from the spec here or if this is a bug?
How often does it reproduce? Is there a required condition?
/
What is the expected behavior?
/
What do you see instead?
/
Additional information
/