aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-16 17:20:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-16 17:22:32 +0200
commit12ccaed2a53c07edb12f5b4e944d3a78e6a6fa0c (patch)
tree29876c11e21c9fd887810de2281cf1dabf77e6bf /tests/server
parente9422bc1936f3df60d9f51cfb41adaec74ab9626 (diff)
http-proxy: deal with EAGAIN
... the previous code would reset the header length wrongly (since 5113ad0424). This makes test 1060 reliable again. Also: make sws send even smaller chunks of data to increase the likeliness of this happening.
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/sws.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 163fe8b2b..b1199ccc6 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -1194,12 +1194,12 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
responsesize = count;
do {
- /* Ok, we send no more than 200 bytes at a time, just to make sure that
+ /* Ok, we send no more than N bytes at a time, just to make sure that
larger chunks are split up so that the client will need to do multiple
recv() calls to get it and thus we exercise that code better */
size_t num = count;
- if(num > 200)
- num = 200;
+ if(num > 20)
+ num = 20;
retry:
written = swrite(sock, buffer, num);
@@ -1211,9 +1211,6 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
sendfailure = TRUE;
break;
}
- else {
- logmsg("Sent off %zd bytes", written);
- }
/* write to file as well */
fwrite(buffer, 1, (size_t)written, dump);