I try set basic qury string with value like curl_url_set(urlp, CURLUPART_QUERY, "a=hello world", CURLU_URLENCODE);
and then I try get URL like curl_url_set(urlp, CURLUPART_URL, &url, 0);
I expected the following
I expect url like http://example.com/?a=hello+world but I got http://example.com/?a%3dhello+world
I agree that adding multiple key / value pairs in one call can lead to ambiguity and function should add always only one pair per call. But function should not encode first equal sign.
Also, I found that curl does not encode equal sign when use call like curl_url_set(urlp, CURLUPART_QUERY, "a=hello=world", CURLU_APPENDQUERY + CURLU_URLENCODE);
In this case result is ?a=hello=world. It little inconsistence but not a bug I think.
Windows 10 x64
The text was updated successfully, but these errors were encountered: