diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-11-11 10:57:04 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-11-11 15:56:05 +0100 |
commit | bf12c2bed692a1cc62b8a3a76eb61e15d50cc74f (patch) | |
tree | 7ef05ab4afd3faac00c504ae6680562d3b5e4d4c /lib/ftp.c | |
parent | dafdb20a26d0c890e83dea61a104b75408481ebd (diff) | |
download | curl-bf12c2bed692a1cc62b8a3a76eb61e15d50cc74f.tar.gz |
lib: remove bad set.opt_no_body assignments
This struct field MUST remain what the application set it to, so that
handle reuse and handle duplication work.
Instead, the request state bit 'no_body' is introduced for code flows
that need to change this in run-time.
Closes #9888
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1510,7 +1510,7 @@ static CURLcode ftp_state_type(struct Curl_easy *data) /* If we have selected NOBODY and HEADER, it means that we only want file information. Which in FTP can't be much more than the file size and date. */ - if(data->set.opt_no_body && ftpc->file && + if(data->req.no_body && ftpc->file && ftp_need_type(conn, data->state.prefer_ascii)) { /* The SIZE command is _not_ RFC 959 specified, and therefore many servers may not support it! It is however the only way we have to get a file's @@ -2082,7 +2082,7 @@ static CURLcode ftp_state_mdtm_resp(struct Curl_easy *data, /* If we asked for a time of the file and we actually got one as well, we "emulate" an HTTP-style header in our output. */ - if(data->set.opt_no_body && + if(data->req.no_body && ftpc->file && data->set.get_filetime && (data->info.filetime >= 0) ) { @@ -3699,7 +3699,7 @@ CURLcode ftp_perform(struct Curl_easy *data, DEBUGF(infof(data, "DO phase starts")); - if(data->set.opt_no_body) { + if(data->req.no_body) { /* requested no body means no transfer... */ struct FTP *ftp = data->req.p.ftp; ftp->transfer = PPTRANSFER_INFO; |