mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:03:33 +03:00
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:
parent
dafdb20a26
commit
bf12c2bed6
13 changed files with 30 additions and 28 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue