unshiftio / url-parse

Small footprint URL parser that works seamlessly across Node.js and browser environments.
http://unshift.io
MIT License
1.03k stars 103 forks source link

Readd the empty userinfo to `url.href` #226

Closed lpinca closed 2 years ago

lpinca commented 2 years ago

If the userinfo is present but empty, the parsed host is also empty, and url.pathname is not '/', then readd the empty userinfo to url.href, otherwise the original invalid URL might be transformed into a valid one with url.pathname as host.