From: Marc Aldorasi Date: Thu, 2 Jan 2020 17:05:11 +0000 (-0500) Subject: tests: Fix bounce requests with truncated writes X-Git-Tag: curl-7_68_0~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be83fe11bf97c9a1ebe71a0bd0e7c2765641dee5;p=thirdparty%2Fcurl.git 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 --- diff --git a/tests/server/sws.c b/tests/server/sws.c index c1bbdf7e05..10982b63a5 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -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) " "were sent", responsesize-count, responsesize); + prevtestno = req->testno; + prevpartno = req->partno; free(ptr); free(cmd); return -1;