Open grahamc opened 10 months ago
It seems the issue only happens when using path_segments_mut because of the code here.
I think %
was added to PATH_SEGMENT & SPECIAL_PATH_SEGMENT to prevent you from setting the path to %2e which is not allowed.
let x = url::Url::parse("https://example.com/foo%2bbar");
works as expected.
(but I'm hoping ...)
Describe the bug
This code sample, which is clearly standards-correct behavior emits
https://example.com/foo+bar
:However, some systems like AWS S3 incorrectly interpret
+
's in the path to be spaces:S3 does decode a
%2B
as a+
, like I'm hoping for.This puts me in a pickle about how to do this. If I url-encode the
+
before passing it to URL, it gets (again, properly) encoded to%252B
, but S3 doesn't understand that obviously.Is there a way to get the behavior I'm looking for? Would I have to get the path implement my own string replacement of
+
with%2B
?