mirror of
https://github.com/curl/curl.git
synced 2026-08-25 22:23:53 +03:00
Prevent uploading to a URL that has no file name part.
This commit is contained in:
parent
aa50a00898
commit
7d68101f83
6 changed files with 82 additions and 3 deletions
|
|
@ -3816,6 +3816,13 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
|
|||
ftp->file=NULL; /* instead of point to a zero byte, we make it a NULL
|
||||
pointer */
|
||||
|
||||
if(data->set.upload && !ftp->file &&
|
||||
(!ftp->no_transfer || conn->bits.no_body)) {
|
||||
/* We need a file name when uploading. Return error! */
|
||||
failf(data, "Uploading to a URL without a file name!");
|
||||
return CURLE_URL_MALFORMAT;
|
||||
}
|
||||
|
||||
ftp->cwddone = FALSE; /* default to not done */
|
||||
|
||||
if(ftp->prevpath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue