surf icon indicating copy to clipboard operation
surf copied to clipboard

base_url "/" handling

Open Fishrock123 opened this issue 5 years ago • 1 comments

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.

Fishrock123 avatar Oct 22 '20 18:10 Fishrock123

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.

ericsampson avatar Oct 05 '21 22:10 ericsampson