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
This commit is contained in:
Daniel Stenberg 2022-11-11 10:57:04 +01:00
parent dafdb20a26
commit bf12c2bed6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 30 additions and 28 deletions

View file

@ -1416,7 +1416,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
case SSH_SFTP_READDIR_INIT:
Curl_pgrsSetDownloadSize(data, -1);
if(data->set.opt_no_body) {
if(data->req.no_body) {
state(data, SSH_STOP);
break;
}

View file

@ -2251,7 +2251,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
case SSH_SFTP_READDIR_INIT:
Curl_pgrsSetDownloadSize(data, -1);
if(data->set.opt_no_body) {
if(data->req.no_body) {
state(data, SSH_STOP);
break;
}

View file

@ -837,7 +837,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
case SSH_SFTP_READDIR_INIT:
Curl_pgrsSetDownloadSize(data, -1);
if(data->set.opt_no_body) {
if(data->req.no_body) {
state(data, SSH_STOP);
break;
}