mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 09:08:49 -05:00
tests: Fix bounce requests with truncated writes
Prior to this change the swsbounce check in service_connection could fail because prevtestno and prevpartno were not set, which would cause the wrong response data to be sent to some tests and cause them to fail. Ref: https://github.com/curl/curl/pull/4717#issuecomment-570240785
This commit is contained in:
parent
a8d13336b5
commit
be83fe11bf
@ -1242,6 +1242,8 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
|
|||||||
logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) "
|
logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) "
|
||||||
"were sent",
|
"were sent",
|
||||||
responsesize-count, responsesize);
|
responsesize-count, responsesize);
|
||||||
|
prevtestno = req->testno;
|
||||||
|
prevpartno = req->partno;
|
||||||
free(ptr);
|
free(ptr);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user