mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:43:39 +03:00
sendf: fix CRLF conversion of input
When CRLF line end conversion was enabled (--crlf), input after the last newline in the upload buffer was not sent, if the buffer contained a newline. Reported-by: vuonganh1993 on github Fixes #14165 Closes #14169
This commit is contained in:
parent
6f0a8bd43c
commit
9e5b11c659
4 changed files with 12 additions and 0 deletions
|
|
@ -1025,6 +1025,12 @@ static CURLcode cr_lc_read(struct Curl_easy *data,
|
|||
* the content length after having started the request... */
|
||||
}
|
||||
}
|
||||
|
||||
if(start < i) { /* leftover */
|
||||
result = Curl_bufq_cwrite(&ctx->buf, buf + start, i - start, &n);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUGASSERT(!Curl_bufq_is_empty(&ctx->buf));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue