3 ms·
Is that per standard, or the result of an implementation detail in Go that might be different in e.g. Python?
by dotancohen 5y ago
Is that per standard, or the result of an implementation detail in Go that might be different in e.g. Python?
- hn_throwaway_99 5y agoIt's a client-side thing, not a server-side thing. That is, if you have a resource (like an href to another page) in your html, and that link is a relative link, the full URL that your browser ends up requesting depends on whether there is a trailing slash or not, because "relative" is relative to the current URL's directory, and what is considered the current directory differs depending on the presence of a trailing slash.
- shellac 5y agoPart of the URI standard: return a string consisting of the reference's path component appended to all but the last segment of the base URI's path (i.e., excluding any characters after the right-most "/" in the base URI path, or excluding the entire base URI path if it does not contain any "/" characters https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.3 https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.3