mirror of
https://github.com/curl/curl.git
synced 2026-06-18 15:15:42 +03:00
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:
parent
b82eb72d80
commit
d24a2ffefe
4 changed files with 62 additions and 52 deletions
|
|
@ -1131,12 +1131,10 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
/*
|
||||
* We have specified a file to upload and it isn't "-".
|
||||
*/
|
||||
char *nurl = add_file_name_to_url(per->this_url, per->uploadfile);
|
||||
if(!nurl) {
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
result = add_file_name_to_url(per->curl, &per->this_url,
|
||||
per->uploadfile);
|
||||
if(result)
|
||||
break;
|
||||
}
|
||||
per->this_url = nurl;
|
||||
}
|
||||
else if(per->uploadfile && stdin_upload(per->uploadfile)) {
|
||||
/* count to see if there are more than one auth bit set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue