mime: fix unpausing of readers

When unpausing a transfer, check if the reader pause state differs
in addition to the "keepon" flags.

Reported-by: 包布丁
Fixes #18848
Closes #19178
This commit is contained in:
Stefan Eissing 2025-10-21 13:51:10 +02:00 committed by Daniel Stenberg
parent 76d2852550
commit 40f7cd2bdd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 68 additions and 14 deletions

View file

@ -1165,7 +1165,8 @@ CURLcode curl_easy_pause(CURL *d, int action)
send_paused = Curl_xfer_send_is_paused(data);
send_paused_new = (action & CURLPAUSE_SEND);
if(send_paused != send_paused_new) {
if((send_paused != send_paused_new) ||
(send_paused_new != Curl_creader_is_paused(data))) {
changed = TRUE;
result = Curl_1st_err(result, Curl_xfer_pause_send(data, send_paused_new));
}

View file

@ -1442,6 +1442,7 @@ CURLcode Curl_creader_unpause(struct Curl_easy *data)
while(reader) {
result = reader->crt->cntrl(data, reader, CURL_CRCNTRL_UNPAUSE);
CURL_TRC_READ(data, "unpausing %s -> %d", reader->crt->name, result);
if(result)
break;
reader = reader->next;