aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2013-02-15 11:50:45 +0100
committerLinus Nielsen Feltzing <linus@haxx.se>2013-03-13 23:55:24 +0100
commit0f147887b0d592d5fa72215282e84103eb165ad7 (patch)
tree4ad5bc8185f3f8df0eed54ee45afd26d692b44a0 /tests/data
parent911b2d3f677eb1538d8469d43df5780e8b7c7abc (diff)
Multiple pipelines and limiting the number of connections.
Introducing a number of options to the multi interface that allows for multiple pipelines to the same host, in order to optimize the balance between the penalty for opening new connections and the potential pipelining latency. Two new options for limiting the number of connections: CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections to the same host. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished, so we can reuse the connection. CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished. The free connection will then be reused, if possible, or closed if the pending handle can't reuse it. Several new options for pipelining: CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a pipeline is "full" when a connection is to be reused, a new connection will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it. If not, the handle will be put in a pending state until a connection is ready (either free or a pipe got shorter). CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a transfer with a content length that is larger than this. CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a chunk larger than this. CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow pipelining. CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow pipelining. See the curl_multi_setopt() man page for details.
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile.am3
-rw-r--r--tests/data/test190057
-rw-r--r--tests/data/test190158
-rw-r--r--tests/data/test190257
-rw-r--r--tests/data/test190357
-rw-r--r--tests/data/test2033144
-rw-r--r--tests/data/test5302
-rw-r--r--tests/data/test5368
-rw-r--r--tests/data/test5842
9 files changed, 385 insertions, 3 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index f65fe0688..7c2e648f5 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -95,13 +95,14 @@ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 \
+test1900 test1901 test1902 test1903 \
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
test2016 test2017 test2018 test2019 test2020 test2021 test2022 \
test2023 test2024 test2025 \
test2026 test2027 test2028 \
test2029 test2030 test2031 \
-test2032
+test2032 test2033
EXTRA_DIST = $(TESTCASES) DISABLED
diff --git a/tests/data/test1900 b/tests/data/test1900
new file mode 100644
index 000000000..857c6096b
--- /dev/null
+++ b/tests/data/test1900
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 1 Completed with status 0
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 100k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1901 b/tests/data/test1901
new file mode 100644
index 000000000..bacf9cb09
--- /dev/null
+++ b/tests/data/test1901
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+Handle 4 Completed with status 0
+Handle 1 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, blacklisted site
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+blacklist_site 127.0.0.1:%HTTPPIPEPORT
+0 1k.txt
+1000 100k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1902 b/tests/data/test1902
new file mode 100644
index 000000000..22f262176
--- /dev/null
+++ b/tests/data/test1902
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 1 Completed with status 0
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, broken pipe
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 connection_close.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1903 b/tests/data/test1903
new file mode 100644
index 000000000..01efa67f8
--- /dev/null
+++ b/tests/data/test1903
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 1 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, penalized on content-length
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 100k.txt
+550 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test2033 b/tests/data/test2033
new file mode 100644
index 000000000..ad926ebce
--- /dev/null
+++ b/tests/data/test2033
@@ -0,0 +1,144 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+pipelining
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Basic auth -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- NTML auth -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib2033
+</tool>
+
+ <name>
+NTLM connection mapping, pipelining enabled
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2032
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20320100 HTTP/1.1
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Host: 127.0.0.1:8990
+Accept: */*
+
+GET /20320100 HTTP/1.1
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
+Host: 127.0.0.1:8990
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
+Host: 127.0.0.1:8990
+Accept: */*
+
+GET /20320200 HTTP/1.1
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Host: 127.0.0.1:8990
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test530 b/tests/data/test530
index 359d04cf1..09e742179 100644
--- a/tests/data/test530
+++ b/tests/data/test530
@@ -2,7 +2,7 @@
<info>
<keywords>
HTTP
-Pipelining
+pipelining
multi
</keywords>
</info>
diff --git a/tests/data/test536 b/tests/data/test536
index 334c07f06..ef8263d98 100644
--- a/tests/data/test536
+++ b/tests/data/test536
@@ -1,4 +1,12 @@
<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
<reply>
<data mode="text">
HTTP/1.1 404 Badness
diff --git a/tests/data/test584 b/tests/data/test584
index 81d6a083d..8d1ca92f9 100644
--- a/tests/data/test584
+++ b/tests/data/test584
@@ -2,7 +2,7 @@
<info>
<keywords>
HTTP
-Pipelining
+pipelining
multi
</keywords>
</info>