summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-11-11 10:57:04 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-11-11 15:56:05 +0100
commitbf12c2bed692a1cc62b8a3a76eb61e15d50cc74f (patch)
tree7ef05ab4afd3faac00c504ae6680562d3b5e4d4c /lib/ftp.c
parentdafdb20a26d0c890e83dea61a104b75408481ebd (diff)
downloadcurl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index b85a27493..2c639ebff 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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;