From bf12c2bed692a1cc62b8a3a76eb61e15d50cc74f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 11 Nov 2022 10:57:04 +0100 Subject: 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 --- lib/smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/smtp.c') 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; } -- cgit v1.2.1