From b88940850002a3f1c25bc6488b95ad30eb80d696 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 20 Jul 2019 19:14:00 +0200 Subject: curl: support parallel transfers This is done by making sure each individual transfer is first added to a linked list as then they can be performed serially, or at will, in parallel. Closes #3804 --- tests/data/test1002 | 8 ++++++++ tests/data/test1291 | 10 ++-------- tests/data/test1406 | 2 +- tests/data/test1412 | 18 ++++++++++++++++++ tests/data/test1418 | 13 +++++++++++++ tests/data/test153 | 24 +++++++++++++++++++++++- tests/data/test2006 | 4 ---- tests/data/test2007 | 4 ---- tests/data/test2008 | 4 ---- tests/data/test2009 | 4 ---- tests/data/test2010 | 4 ---- 11 files changed, 65 insertions(+), 30 deletions(-) (limited to 'tests/data') diff --git a/tests/data/test1002 b/tests/data/test1002 index d12046e5e..c20995d90 100644 --- a/tests/data/test1002 +++ b/tests/data/test1002 @@ -101,6 +101,14 @@ Content-Length: 3 Expect: 100-continue st +GET http://%HOSTIP:%HTTPPORT/1002.upload2 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Content-Range: bytes 2-4/5 +User-Agent: curl/7.16.1 +Accept: */* +Proxy-Connection: Keep-Alive +Content-Length: 0 + GET http://%HOSTIP:%HTTPPORT/1002.upload2 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload2", response="d711f0d2042786d930de635ba0d1a1d0" diff --git a/tests/data/test1291 b/tests/data/test1291 index 3f1575184..a2e505fc9 100644 --- a/tests/data/test1291 +++ b/tests/data/test1291 @@ -21,7 +21,7 @@ HTTP PUT none -Attempt to upload 100K files but fail immediately +Attempt to upload 1000 files but fail immediately -K log/cmd1291 --fail-early @@ -31,7 +31,7 @@ XXXXXXXx # generate the config file -perl -e 'for(1 .. 100000) { printf("upload-file=log/upload-this\nurl=htttttp://non-existing-host.haxx.se/upload/1291\n", $_);}' > log/cmd1291; +perl -e 'for(1 .. 1000) { printf("upload-file=log/upload-this\nurl=htttttp://non-existing-host.haxx.se/upload/1291\n", $_);}' > log/cmd1291; @@ -40,11 +40,5 @@ perl -e 'for(1 .. 100000) { printf("upload-file=log/upload-this\nurl=htttttp://n 1 - -# we disable valgrind here since it takes 40+ seconds even on a fairly snappy -# machine - -disable - diff --git a/tests/data/test1406 b/tests/data/test1406 index ab835d3cb..8803c846e 100644 --- a/tests/data/test1406 +++ b/tests/data/test1406 @@ -76,13 +76,13 @@ int main(int argc, char *argv[]) hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L); - curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38); curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406"); curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "sender@example.com"); curl_easy_setopt(hnd, CURLOPT_MAIL_RCPT, slist1); + curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38); /* Here is a list of options the curl code used that cannot get generated as source easily. You may select to either not use them or implement diff --git a/tests/data/test1412 b/tests/data/test1412 index ae63290e9..36d3d1d93 100644 --- a/tests/data/test1412 +++ b/tests/data/test1412 @@ -25,6 +25,19 @@ Connection: close This is not the real page +# The second URL will get this response + +HTTP/1.1 401 Authorization Required swsclose +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" +WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" +WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344" +Content-Type: text/html; charset=iso-8859-1 +Connection: close + +This is not the real page + + # This is supposed to be returned when the server gets a # Authorization: Digest line passed-in from the client @@ -107,6 +120,11 @@ Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce= User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 Accept: */* +GET /14120001 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 +Accept: */* + GET /14120001 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e" diff --git a/tests/data/test1418 b/tests/data/test1418 index b3a2f23b2..c137b1c59 100644 --- a/tests/data/test1418 +++ b/tests/data/test1418 @@ -22,6 +22,15 @@ WWW-Authenticate: Basic Please auth with me + +HTTP/1.1 401 Authentication please! +Content-Length: 20 +WWW-Authenticate: Digest realm="loonie", nonce="314156592" +WWW-Authenticate: Basic + +Please auth with me + + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client @@ -97,6 +106,10 @@ Host: %HOSTIP:%HTTPPORT Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/1418", response="986238b7e0077754944c966f56d9bc77" Accept: */* +GET /14180003 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + GET /14180003 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/14180003", response="1c6390a67bac3283a9b023402f3b3540" diff --git a/tests/data/test153 b/tests/data/test153 index f679de4ea..77f7adb01 100644 --- a/tests/data/test153 +++ b/tests/data/test153 @@ -9,7 +9,7 @@ HTTP Digest auth # Server-side -# reply back and ask for Digest auth +# First reply back and ask for Digest auth HTTP/1.1 401 Authorization Required swsclose Server: Apache/1.3.27 (Darwin) PHP/4.1.2 @@ -20,6 +20,17 @@ Content-Length: 26 This is not the real page +# second reply back + +HTTP/1.1 401 Authorization Required swsclose +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 26 + +This is not the real page + + # This is supposed to be returned when the server gets a # Authorization: Digest line passed-in from the client @@ -91,6 +102,11 @@ Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145" User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 Accept: */* +GET /1530002 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS +Accept: */* + GET /1530002 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530002", response="f84511b014fdd0ba6494f42871079c32" @@ -117,6 +133,12 @@ Content-Type: text/html; charset=iso-8859-1 Content-Length: 23 This IS the real page! +HTTP/1.1 401 Authorization Required swsclose +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 26 + HTTP/1.1 401 Authorization re-negotiation please swsbounce Server: Apache/1.3.27 (Darwin) PHP/4.1.2 WWW-Authenticate: Digest realm="testrealm", algorithm=MD5, nonce="999999", stale=true, qop="auth" diff --git a/tests/data/test2006 b/tests/data/test2006 index 3acbdaee2..4d08e0aad 100644 --- a/tests/data/test2006 +++ b/tests/data/test2006 @@ -86,10 +86,6 @@ Accept: */* Some data delivered from an HTTP resource -Content-Length: 496 -Accept-ranges: bytes - - HTTP/1.1 200 OK Date: Thu, 21 Jun 2012 14:49:01 GMT Server: test-server/fake diff --git a/tests/data/test2007 b/tests/data/test2007 index b169c4906..bb4d5cde9 100644 --- a/tests/data/test2007 +++ b/tests/data/test2007 @@ -90,10 +90,6 @@ Something delivered from an HTTP resource s/Last-Modified:.*// -Content-Length: 496 -Accept-ranges: bytes - - HTTP/1.1 200 OK Date: Thu, 21 Jun 2012 14:50:02 GMT Server: test-server/fake diff --git a/tests/data/test2008 b/tests/data/test2008 index 012f221c4..d6bbf6b4b 100644 --- a/tests/data/test2008 +++ b/tests/data/test2008 @@ -82,10 +82,6 @@ Some stuff delivered from an HTTP resource s/Last-Modified:.*// -Content-Length: 496 -Accept-ranges: bytes - - HTTP/1.1 200 OK Date: Thu, 21 Jun 2012 15:23:48 GMT Server: test-server/fake diff --git a/tests/data/test2009 b/tests/data/test2009 index b0e5c6c66..1a9335851 100644 --- a/tests/data/test2009 +++ b/tests/data/test2009 @@ -83,10 +83,6 @@ Some contents delivered from an HTTP resource s/Last-Modified:.*// -Content-Length: 496 -Accept-ranges: bytes - - HTTP/1.1 200 OK Date: Thu, 21 Jun 2012 16:27:17 GMT Server: test-server/fake diff --git a/tests/data/test2010 b/tests/data/test2010 index 33bb309eb..1f5320fe9 100644 --- a/tests/data/test2010 +++ b/tests/data/test2010 @@ -82,10 +82,6 @@ Contents delivered from an HTTP resource s/Last-Modified:.*// -Content-Length: 496 -Accept-ranges: bytes - - HTTP/1.1 200 OK Date: Thu, 21 Jun 2012 17:37:27 GMT Server: test-server/fake -- cgit v1.2.3