]> git.ipfire.org Git - thirdparty/curl.git/commit
urlapi: have *set(PATH) prepend a slash if one is missing
authorDaniel Stenberg <daniel@haxx.se>
Thu, 8 Jun 2023 11:15:09 +0000 (13:15 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 8 Jun 2023 14:08:45 +0000 (16:08 +0200)
commit3c9256c8a0b5a36dde28b49cc8df8c6d0aae1f48
treecdaed8536094192c923a9b88737e2d08d3f91d89
parent7d62f0d9b8ac9f2b58682891ecd6e2daab2114aa
urlapi: have *set(PATH) prepend a slash if one is missing

Previously the code would just do that for the path when extracting the
full URL, which made a subsequent curl_url_get() of the path to
(unexpectedly) still return it without the leading path.

Amend lib1560 to verify this. Clarify the curl_url_set() docs about it.

Bug: https://curl.se/mail/lib-2023-06/0015.html
Closes #11272
Reported-by: Pedro Henrique
docs/libcurl/curl_url_set.3
lib/urlapi.c
tests/libtest/lib1560.c