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/smtp.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/smtp.c')
-rw-r--r-- | lib/smtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/smtp.c b/lib/smtp.c index 89be8164f..e70423603 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1050,7 +1050,7 @@ static CURLcode smtp_state_command_resp(struct Curl_easy *data, int smtpcode, } else { /* Temporarily add the LF character back and send as body to the client */ - if(!data->set.opt_no_body) { + if(!data->req.no_body) { line[len] = '\n'; result = Curl_client_write(data, CLIENTWRITE_BODY, line, len + 1); line[len] = '\0'; @@ -1490,7 +1490,7 @@ static CURLcode smtp_perform(struct Curl_easy *data, bool *connected, DEBUGF(infof(data, "DO phase starts")); - if(data->set.opt_no_body) { + if(data->req.no_body) { /* Requested no body means no transfer */ smtp->transfer = PPTRANSFER_INFO; } |