request: eliminate request getheader bool, reverse header default

Deduce that the transfer response expects headers by the protocol
handler implementing `write_resp_hd` callback. This eleminates the
`getheader` parameter in the `Curl_xfer_setup_*()` methods.

Add an implementation to RTSP for `write_resp_hd`, joining the HTTP
protocol in the only handlers having it.

Reverse the default of request's `header` bit that signals that headers
are expected. Default is now FALSE, set to TRUE when setting up the
transfer by presence of `write_resp_hd` in the protocol handler.

Closes #18218
This commit is contained in:
Stefan Eissing 2025-08-07 11:29:10 +02:00 committed by Daniel Stenberg
parent c1372df2e2
commit fd9429cc29
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
16 changed files with 46 additions and 46 deletions

View file

@ -1540,7 +1540,7 @@ sftp_download_stat(struct Curl_easy *data,
myssh_state(data, sshc, SSH_STOP);
return CURLE_OK;
}
Curl_xfer_setup_recv(data, FIRSTSOCKET, data->req.size, FALSE);
Curl_xfer_setup_recv(data, FIRSTSOCKET, data->req.size);
/* not set by Curl_xfer_setup to preserve keepon bits */
data->conn->send_idx = 0;
@ -2460,7 +2460,7 @@ static CURLcode ssh_state_scp_download_init(struct Curl_easy *data,
/* download data */
bytecount = (curl_off_t)sb.st_size;
data->req.maxdownload = (curl_off_t)sb.st_size;
Curl_xfer_setup_recv(data, FIRSTSOCKET, bytecount, FALSE);
Curl_xfer_setup_recv(data, FIRSTSOCKET, bytecount);
/* not set by Curl_xfer_setup to preserve keepon bits */
data->conn->send_idx = 0;