mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:53:32 +03:00
urlapi: URL encode a '+' in the query part
... when asked to with CURLU_URLENCODE. Extended test 1560 to verify. Reported-by: Dietmar Hauser Fixes #6086 Closes #6087
This commit is contained in:
parent
3862c37b63
commit
b7ea3d2c22
2 changed files with 14 additions and 20 deletions
|
|
@ -478,6 +478,13 @@ static int checkurl(const char *url, const char *out)
|
|||
|
||||
/* !checksrc! disable SPACEBEFORECOMMA 1 */
|
||||
static struct setcase set_parts_list[] = {
|
||||
{"https://example.com/",
|
||||
"query=Al2cO3tDkcDZ3EWE5Lh+LX8TPHs,", /* contains '+' */
|
||||
"https://example.com/?Al2cO3tDkcDZ3EWE5Lh%2bLX8TPHs",
|
||||
CURLU_URLDECODE, /* decode on get */
|
||||
CURLU_URLENCODE, /* encode on set */
|
||||
CURLUE_OK, CURLUE_OK},
|
||||
|
||||
{"https://example.com/",
|
||||
/* Set a 41 bytes scheme. That's too long so the old scheme remains set. */
|
||||
"scheme=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc,",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue