curl/add_file_name_to_url: use the libcurl URL parser

instead of the custom error-prone parser, to extract and update the path
of the given URL

Closes #9683
This commit is contained in:
Daniel Stenberg 2022-10-10 10:55:05 +02:00
parent b82eb72d80
commit d24a2ffefe
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 62 additions and 52 deletions

View file

@ -33,7 +33,7 @@ bool output_expected(const char *url, const char *uploadfile);
bool stdin_upload(const char *uploadfile);
char *add_file_name_to_url(char *url, const char *filename);
CURLcode add_file_name_to_url(CURL *curl, char **inurlp, const char *filename);
CURLcode get_url_file_name(char **filename, const char *url);