[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 28/208: http-proxy: deal with EAGAIN
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 28/208: http-proxy: deal with EAGAIN |
Date: |
Wed, 09 Aug 2017 17:33:45 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit 12ccaed2a53c07edb12f5b4e944d3a78e6a6fa0c
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jun 16 17:20:43 2017 +0200
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.
---
lib/http_proxy.c | 3 +--
tests/server/sws.c | 9 +++------
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);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 08/208: RELEASE-NOTES: synced with 2ad80eec5, (continued)
- [GNUnet-SVN] [gnurl] 08/208: RELEASE-NOTES: synced with 2ad80eec5, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 11/208: lib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 18/208: http-proxy: fix build with --disable-proxy or --disable-http, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 15/208: fuzz: bring oss-fuzz initial code converted to C89, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 10/208: test1147: verify -H on a file, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 16/208: fuzz: corpora file structure, initial commit, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 14/208: http-proxy: only attempt FTP over HTTP proxy, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 27/208: libtest/libntlmconnect: fix compiler warnings from f94fcdb, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 23/208: test1061: mark as flaky, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 21/208: mk-ca-bundle.pl: Check curl's exit code after certdata download, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 28/208: http-proxy: deal with EAGAIN,
gnunet <=
- [GNUnet-SVN] [gnurl] 19/208: configure: disable nghttp2 too if HTTP has been disabled, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 39/208: http_proxy: fix compiler warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 32/208: curl-compilers.m4: enable missing-variable-declarations clang warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 41/208: CURLOPT_PREQUOTE.3: spellfix man page reference, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 38/208: TODO: update the TOC too, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 24/208: test1148: verify the -# progressbar, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 30/208: curl-compilers.m4: enable vla warning for clang, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 33/208: curl-compilers.m4: enable comma clang warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 34/208: Makefile.m32: enable -W for MinGW32 build, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 40/208: http_proxy: fix build with http and proxy, gnunet, 2017/08/09