mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:43:37 +03:00
curl: error out if -T and -d are used for the same URL
As one implies PUT and the other POST, both cannot be used simultaneously. Add test 378 to verify. Reported-by: Boris Verkhovskiy Fixes #8704 Closes #8715
This commit is contained in:
parent
6968fb9d54
commit
01a1697a79
5 changed files with 54 additions and 6 deletions
|
|
@ -917,6 +917,12 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
result = CURLE_OUT_OF_MEMORY;
|
||||
break;
|
||||
}
|
||||
if(SetHTTPrequest(config, HTTPREQ_PUT, &config->httpreq)) {
|
||||
Curl_safefree(per->uploadfile);
|
||||
curl_easy_cleanup(curl);
|
||||
result = CURLE_FAILED_INIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*added = TRUE;
|
||||
per->config = config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue