urldata: remove crlf_conversions counter

Since the introduction of client writers, we check the body length in
the PROTOCOL phase and do FTP lineend conversions laster in the
CONTENT_DECODING phase. This means we no longer need to count the
conversions for length checks.

Closes #14709
This commit is contained in:
Stefan Eissing 2024-08-28 12:54:29 +02:00 committed by Daniel Stenberg
parent 1b0568539d
commit 64ab0ace27
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 6 additions and 29 deletions

View file

@ -518,15 +518,7 @@ CURLcode Curl_sendrecv(struct Curl_easy *data, struct curltime *nowp)
* returning.
*/
if(!(data->req.no_body) && (k->size != -1) &&
(k->bytecount != k->size) &&
#ifdef CURL_DO_LINEEND_CONV
/* Most FTP servers do not adjust their file SIZE response for CRLFs,
so we will check to see if the discrepancy can be explained
by the number of CRLFs we have changed to LFs.
*/
(k->bytecount != (k->size + data->state.crlf_conversions)) &&
#endif /* CURL_DO_LINEEND_CONV */
!k->newurl) {
(k->bytecount != k->size) && !k->newurl) {
failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T
" bytes remaining to read", k->size - k->bytecount);
result = CURLE_PARTIAL_FILE;