forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make url.parse() behave more like browsers and WHATWHG URL when dealing with URLs that of the format `http:@example.com`. This is the same as `http://example.com`. This issue was reported by P0cas. https://github.com/P0cas PR-URL: nodejs#42136 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
- Loading branch information
Showing
2 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -975,7 +975,22 @@ const parseTests = { | |
query: null, | ||
pathname: '/everybody', | ||
path: '/everybody', | ||
href: '//[email protected]/everybody#to-the-limit' | ||
href: '//[email protected]/everybody#to-the-limit', | ||
}, | ||
|
||
'http:@localhost': { | ||
protocol: 'http:', | ||
slashes: null, | ||
auth: null, | ||
host: 'localhost', | ||
port: null, | ||
hostname: 'localhost', | ||
hash: null, | ||
search: null, | ||
query: null, | ||
pathname: '/', | ||
path: '/', | ||
href: 'http://localhost/', | ||
}, | ||
}; | ||
|
||
|