test1540: improve reliability

- print that bytes have been received on pausing, but not how many

Closes #12069
This commit is contained in:
Stefan Eissing 2023-10-09 10:30:33 +02:00 committed by Daniel Stenberg
parent 56d373033d
commit a383d1372f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ HTTP/1.1 200 OK swsclose
Transfer-Encoding: chunked
Trailer: MyCoolTrailerHeader
Got 4 bytes but pausing!
Got bytes but pausing!
datad474
MyCoolTrailerHeader: amazingtrailer
</datacheck>

View File

@ -76,7 +76,8 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
fwrite(ptr, size, nmemb, stdout);
return len;
}
printf("Got %d bytes but pausing!\n", (int)len);
if(len)
printf("Got bytes but pausing!\n");
st->halted = 1;
return CURL_WRITEFUNC_PAUSE;
}