mirror of
https://github.com/curl/curl.git
synced 2026-07-26 06:57:16 +03:00
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
This commit is contained in:
parent
7d62f0d9b8
commit
3c9256c8a0
3 changed files with 112 additions and 20 deletions
|
|
@ -101,8 +101,8 @@ Port cannot be URL encoded on set. The given port number is provided as a
|
|||
string and the decimal number must be between 1 and 65535. Anything else will
|
||||
return an error.
|
||||
.IP CURLUPART_PATH
|
||||
If a path is set in the URL without a leading slash, a slash will be inserted
|
||||
automatically when this URL is read from the handle.
|
||||
If a path is set in the URL without a leading slash, a slash will be prepended
|
||||
automatically.
|
||||
.IP CURLUPART_QUERY
|
||||
The query part will also get spaces converted to pluses when asked to URL
|
||||
encode on set with the \fICURLU_URLENCODE\fP bit.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue