summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http_proxy.c3
-rw-r--r--tests/server/sws.c9
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 380eded2e..bb788bd2e 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -311,6 +311,7 @@ static CURLcode CONNECT(struct connectdata *conn,
return result;
s->tunnel_state = TUNNEL_CONNECT;
+ s->perline = 0;
} /* END CONNECT PHASE */
check = Curl_timeleft(data, NULL, TRUE);
@@ -328,8 +329,6 @@ static CURLcode CONNECT(struct connectdata *conn,
{ /* READING RESPONSE PHASE */
int error = SELECT_OK;
- s->perline = 0;
-
while(s->keepon && !error) {
ssize_t gotbytes;
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);