aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorMarc Aldorasi <marc@groundctl.com>2020-01-02 12:05:11 -0500
committerJay Satiro <raysatiro@yahoo.com>2020-01-03 01:45:04 -0500
commitbe83fe11bf97c9a1ebe71a0bd0e7c2765641dee5 (patch)
tree621736938b36308e0d0523f8deb70defde816e57 /tests/server
parenta8d13336b5dc369a8f517ba55b5c38c9a23d06b2 (diff)
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
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/sws.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index c1bbdf7e0..10982b63a 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;