Up to and including curl 7.70.0, the code above has produced the expected output, also for empty passwords.
After upgrading to 7.71.0, this code warns about failure to escape the proxy passwords in a test case where getProxyPassword()returns an empty string, "".
I suspect this has to do with the changes to lib/escape.c done in this commit. DYNBUF.md says it Returns a char * to the buffer if it has a length, otherwise a NULL. . If I understand this correctly, this means an empty string passed into curl_easy_escape() will now return an error (NULL) instead of a pointer to an empty string buffer.
This is easy enough to work around, by checking for string emptiness before calling curl_easy_escape(), but is it intentional?
The text was updated successfully, but these errors were encountered: