surf
surf copied to clipboard
base_url "/" handling
Taken from https://github.com/http-rs/surf/pull/252#issuecomment-707942927
base_url acts in unexpected ways when a trailing slash is missing. See that PR for more details.
there's a spec for this, RFC
So AFAIC what's described in #252 as a "bug" is actually correct behavior by the underlying library.
For example, the .NET HttpClient documentation has this note:
Note that all characters after the right-most "/" in the base URI are excluded when combined with the message URI. See RFC 3986 Uniform Resource Identifier (URI) Generic Syntax specification.