diff options
author | ng0 <ng0@n0.is> | 2019-08-15 09:52:39 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-08-15 09:52:39 +0000 |
commit | 36fb08f81b748620e97d7d8e2d4255b77e78c545 (patch) | |
tree | 19aa5019c9e9cbf53d74e272fddc8cbc48b39e51 /tests/server/sws.c | |
parent | 765f80c1e27acb585eebef46a97ffc769e452879 (diff) | |
parent | aa73eb47bc8583070734696b25b34ad54c2c1f5e (diff) | |
download | gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.tar.gz gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.tar.bz2 gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.zip |
Merge tag 'curl-7_65_3'
7.65.3
Diffstat (limited to 'tests/server/sws.c')
-rw-r--r-- | tests/server/sws.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c index e5806875c..963357799 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -952,28 +952,19 @@ static int get_request(curl_socket_t sock, struct httprequest *req) ssize_t got = 0; int overflow = 0; - char *pipereq = NULL; - size_t pipereq_length = 0; - if(req->offset >= REQBUFSIZ-1) { /* buffer is already full; do nothing */ overflow = 1; } else { - if(pipereq_length && pipereq) { - memmove(reqbuf, pipereq, pipereq_length); - got = curlx_uztosz(pipereq_length); - pipereq_length = 0; - } - else { - if(req->skip) - /* we are instructed to not read the entire thing, so we make sure to - only read what we're supposed to and NOT read the enire thing the - client wants to send! */ - got = sread(sock, reqbuf + req->offset, req->cl); - else - got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset); - } + if(req->skip) + /* we are instructed to not read the entire thing, so we make sure to + only read what we're supposed to and NOT read the enire thing the + client wants to send! */ + got = sread(sock, reqbuf + req->offset, req->cl); + else + got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset); + if(got_exit_signal) return -1; if(got == 0) { |