Hacker News new | ask | show | jobs
by jacksonsabey 3694 days ago
There's already a solution in the spec for the slash issue

Either you have a valid scheme or you don't, and either you have a relative path or an absolute path

Double slash after a valid scheme implies an authority, if a 3rd slash exists it's an absolute path, anything past the 3rd slash has to be normalized. So, http:////// is actually http:///

If you have an invalid scheme or a relative path such as http:/ or +http:// it would actually be normalized to ./http:/ ./+http:/

https://tools.ietf.org/html/rfc3986#section-4.2