If you initialized URL with https://www.micosoft.com/ and then .AppendPath("/path/to/something"), you would end up with https://www.microsoft.com//path/to/something, which is a malformed URL and there is no legitimate reason you might want one.
(But if you stated with https://www.micosoft.com (without the slash at the end), and then appended "/path/to/something", the URL will be without the double-slash).
The code ends up cluttered with "if(startsWith('/')){ drop leading '/' }", codegen has this logic. It messes up the recordings. Better to fix this in one place.
See also #5112, #5126, #5124, #5129.
Another thing to consider if we want to additionally make the libcurl transport to behave like WinHTTP, and also fix the double slash there, but I am not going to log an additional work item for that, because I think most likely, fixing the Url class would be enough.
If you initialized URL with
https://www.micosoft.com/and then.AppendPath("/path/to/something"), you would end up withhttps://www.microsoft.com//path/to/something, which is a malformed URL and there is no legitimate reason you might want one.(But if you stated with
https://www.micosoft.com(without the slash at the end), and then appended"/path/to/something", the URL will be without the double-slash).The code ends up cluttered with "
if(startsWith('/')){ drop leading '/' }", codegen has this logic. It messes up the recordings. Better to fix this in one place.See also #5112, #5126, #5124, #5129.
Another thing to consider if we want to additionally make the libcurl transport to behave like WinHTTP, and also fix the double slash there, but I am not going to log an additional work item for that, because I think most likely, fixing the
Urlclass would be enough.