3 ms·
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
by jacksonsabey 10y 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:////// http:////// is actually http:/// http:///
If you have an invalid scheme or a relative path such as http:/ or +http:// http:// it would actually be normalized to ./http:/ ./+http:/
https://tools.ietf.org/html/rfc3986#section-4.2 https://tools.ietf.org/html/rfc3986#section-4.2