diff options
Diffstat (limited to 'tests/data')
41 files changed, 461 insertions, 77 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 3d13e3a27..2eca9c670 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -56,11 +56,11 @@ test289 test290 test291 test292 test293 test294 test295 test296 test297 \ test298 test299 test300 test301 test302 test303 test304 test305 test306 \ test307 test308 test309 test310 test311 test312 test313 test314 test315 \ test316 test317 test318 test319 test320 test321 test322 test323 test324 \ -test325 test326 test327 test328 test329 test330 \ +test325 test326 test327 test328 test329 test330 test331 \ \ test340 \ \ -test350 test351 test352 test353 test354 \ +test350 test351 test352 test353 test354 test355 test356 \ test393 test394 test395 \ \ test400 test401 test402 test403 test404 test405 test406 test407 test408 \ @@ -83,7 +83,7 @@ test617 test618 test619 test620 test621 test622 test623 test624 test625 \ test626 test627 test628 test629 test630 test631 test632 test633 test634 \ test635 test636 test637 test638 test639 test640 test641 test642 \ test643 test644 test645 test646 test647 test648 test649 test650 test651 \ -test652 test653 test654 test655 test656 test658 \ +test652 test653 test654 test655 test656 test658 test659 \ \ test700 test701 test702 test703 test704 test705 test706 test707 test708 \ test709 test710 test711 test712 test713 test714 test715 \ @@ -174,7 +174,7 @@ test1516 test1517 test1518 test1519 test1520 test1521 test1522 \ \ test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \ test1533 test1534 test1535 test1536 test1537 test1538 \ -test1540 \ +test1540 test1541 \ test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \ test1558 test1560 test1561 test1562 \ \ @@ -183,13 +183,13 @@ test1590 test1591 test1592 \ test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \ test1608 test1609 test1620 test1621 \ \ -test1650 test1651 test1652 test1653 \ +test1650 test1651 test1652 test1653 test1654 \ \ test1700 test1701 test1702 \ \ test1800 test1801 \ \ -test1900 test1901 test1902 test1903 test1904 \ +test1900 test1901 test1902 test1903 test1904 test1905 \ \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ diff --git a/tests/data/test1026 b/tests/data/test1026 index bd5dc9c85..6bda7a43f 100644 --- a/tests/data/test1026 +++ b/tests/data/test1026 @@ -28,7 +28,7 @@ curl --manual # Search for these two sentinel lines in the manual output; if they are found, # then chances are good the entire manual is there. <postcheck> -perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(a\s*tool\s*to\s*transfer\s*data)|(mailing\s*lists\s*to\s*discuss\s*curl)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' log/stdout1026 +perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(CONTRIBUTORS)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' log/stdout1026 </postcheck> </client> diff --git a/tests/data/test1034 b/tests/data/test1034 index beab0d3c0..b4ffc8a98 100644 --- a/tests/data/test1034 +++ b/tests/data/test1034 @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> <testcase> <info> <keywords> diff --git a/tests/data/test1046 b/tests/data/test1046 index bc4e5c293..e86e1329c 100644 --- a/tests/data/test1046 +++ b/tests/data/test1046 @@ -40,7 +40,7 @@ HTTP-IPv6 GET with numeric localhost --interface </command> # --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out <precheck> -perl -e "print 'Test requires default test server host address' if ( '%CLIENT6IP' ne '[::1]' );" +perl -e "print 'Test requires default test client host address' if ( '%CLIENT6IP' ne '[::1]' );" </precheck> </client> diff --git a/tests/data/test1048 b/tests/data/test1048 index f94ae58d1..5ed267b55 100644 --- a/tests/data/test1048 +++ b/tests/data/test1048 @@ -48,7 +48,7 @@ FTP-IPv6 dir list PASV with localhost --interface </command> # --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out <precheck> -perl -e "print 'Test requires default test server host address' if ( '%CLIENT6IP' ne '[::1]' );" +perl -e "print 'Test requires default test client host address' if ( '%CLIENT6IP' ne '[::1]' );" </precheck> </client> diff --git a/tests/data/test1050 b/tests/data/test1050 index a0e5beab1..281936bfe 100644 --- a/tests/data/test1050 +++ b/tests/data/test1050 @@ -43,7 +43,7 @@ FTP-IPv6 dir list, EPRT with specified IP </command> # --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out <precheck> -perl -e "print 'Test requires default test server host address' if ( '%CLIENT6IP' ne '[::1]' );" +perl -e "print 'Test requires default test client host address' if ( '%CLIENT6IP' ne '[::1]' );" </precheck> </client> diff --git a/tests/data/test1082 b/tests/data/test1082 index d58dd25cd..8e4078b2d 100644 --- a/tests/data/test1082 +++ b/tests/data/test1082 @@ -35,7 +35,7 @@ HTTP GET with localhost --interface http://%HOSTIP:%HTTPPORT/1082 --interface localhost </command> <precheck> -perl -e "print 'Test requires default test server host address' if ( '%CLIENTIP' ne '127.0.0.1' );" +perl -e "print 'Test requires default test client host address' if ( '%CLIENTIP' ne '127.0.0.1' );" </precheck> </client> diff --git a/tests/data/test1083 b/tests/data/test1083 index e441278da..1b1db0539 100644 --- a/tests/data/test1083 +++ b/tests/data/test1083 @@ -39,7 +39,7 @@ HTTP-IPv6 GET with ip6-localhost --interface -g "http://%HOST6IP:%HTTP6PORT/1083" --interface ip6-localhost </command> <precheck> -perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}" +perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}" </precheck> </client> diff --git a/tests/data/test1097 b/tests/data/test1097 index 7512a2e7d..7eb7b5f3d 100644 --- a/tests/data/test1097 +++ b/tests/data/test1097 @@ -60,7 +60,7 @@ http://test.a.galaxy.far.far.away.1097:%HTTPPORT/1097 --proxy http://%HOSTIP:%HT <strip> ^User-Agent: curl/.* </strip> -<protocol> +<protocol nonewline="yes"> CONNECT test.a.galaxy.far.far.away.1097:%HTTPPORT HTTP/1.1
Host: test.a.galaxy.far.far.away.1097:%HTTPPORT
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
@@ -71,9 +71,10 @@ POST /1097 HTTP/1.1 User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS
Host: test.a.galaxy.far.far.away.1097:%HTTPPORT
Accept: */*
-Content-Length: 0
+Content-Length: 11
Content-Type: application/x-www-form-urlencoded
+dummy=value </protocol> </verify> diff --git a/tests/data/test1133 b/tests/data/test1133 index d71155eda..737f9d9e2 100644 --- a/tests/data/test1133 +++ b/tests/data/test1133 @@ -29,7 +29,7 @@ HTTP RFC1867-type formposting with filename/data contains ',', ';', '"' http://%HOSTIP:%HTTPPORT/we/want/1133 -F "file=@\"log/test1133,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"log/test1133,and;.txt"' -F 'file3=@"log/test1133,and;.txt";type=m/f,"log/test1133,and;.txt"' -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" -F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b' </command> # We create this file before the command is invoked! -<file name=log/test1133,and;.txt> +<file name="log/test1133,and;.txt"> foo bar This is a bar foo bar diff --git a/tests/data/test1149 b/tests/data/test1149 index ae081a8a9..f826391e9 100644 --- a/tests/data/test1149 +++ b/tests/data/test1149 @@ -1,5 +1,5 @@ -# based on test1010 <testcase> +# based on test1010 <info> <keywords> FTP diff --git a/tests/data/test1156 b/tests/data/test1156 index fb4836242..f78dc998f 100644 --- a/tests/data/test1156 +++ b/tests/data/test1156 @@ -67,4 +67,5 @@ http://%HOSTIP:%HTTPPORT/want/1156 <errorcode> 0 </errorcode> +</verify> </testcase> diff --git a/tests/data/test1160 b/tests/data/test1160 index 3fe689e96..63dd0a7a0 100644 --- a/tests/data/test1160 +++ b/tests/data/test1160 @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> <testcase> <info> <keywords> diff --git a/tests/data/test1262 b/tests/data/test1262 index 4b08a2cf2..ed526c099 100644 --- a/tests/data/test1262 +++ b/tests/data/test1262 @@ -1,5 +1,5 @@ -# similar to test 139 but with a reversed time condition <testcase> +# similar to test 139 but with a reversed time condition <info> <keywords> FTP diff --git a/tests/data/test1263 b/tests/data/test1263 index 7946916e2..7462db4d4 100644 --- a/tests/data/test1263 +++ b/tests/data/test1263 @@ -1,5 +1,5 @@ -# similar to test 1260 <testcase> +# similar to test 1260 <info> <keywords> HTTP diff --git a/tests/data/test1291 b/tests/data/test1291 index 12d65f3d8..3f1575184 100644 --- a/tests/data/test1291 +++ b/tests/data/test1291 @@ -1,7 +1,6 @@ +<testcase> # This test case is primarily meant to verify that parsing and adding the 100K # files is a swift operation. -# -<testcase> <info> <keywords> HTTP diff --git a/tests/data/test1307 b/tests/data/test1307 index 82ed3c07f..c4f7ac729 100644 --- a/tests/data/test1307 +++ b/tests/data/test1307 @@ -15,6 +15,7 @@ none </server> <features> unittest +ftp </features> <name> internal Curl_fnmatch() testing diff --git a/tests/data/test1404 b/tests/data/test1404 index a00bf10a3..a7b8cc823 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -94,6 +94,8 @@ s/(USERAGENT, \")[^\"]+/${1}stripped/ $_ = '' if /CURLOPT_SSL_VERIFYPEER/ $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/ $_ = '' if /CURLOPT_HTTP_VERSION/ +# CURL_DOES_CONVERSION generates an extra comment. +$_ = '' if /\/\* "value" \*\// </stripfile> <file name="log/test1404.c" mode="text"> /********* Sample code generated by the curl command line tool ********** diff --git a/tests/data/test1425 b/tests/data/test1425 Binary files differindex 0044c69d5..ce9ba97fb 100644 --- a/tests/data/test1425 +++ b/tests/data/test1425 diff --git a/tests/data/test1426 b/tests/data/test1426 Binary files differindex dd6a8d117..851d8c3fb 100644 --- a/tests/data/test1426 +++ b/tests/data/test1426 diff --git a/tests/data/test1449 b/tests/data/test1449 index d30c13c68..1911b0272 100644 --- a/tests/data/test1449 +++ b/tests/data/test1449 @@ -1,5 +1,5 @@ -# initially based on test110 <testcase> +# initially based on test110 <info> <keywords> FTP diff --git a/tests/data/test1455 b/tests/data/test1455 index 0b77dc4f5..7276ea4ec 100644 --- a/tests/data/test1455 +++ b/tests/data/test1455 @@ -9,7 +9,7 @@ HTTP GET # # Server-side <reply name="1455"> -<data nocheck=yes> +<data nocheck="yes"> HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake diff --git a/tests/data/test1456 b/tests/data/test1456 index 07a6e7c03..007473618 100644 --- a/tests/data/test1456 +++ b/tests/data/test1456 @@ -9,7 +9,7 @@ IPv6 # # Server-side <reply> -<data nocheck=yes> +<data nocheck="yes"> HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake @@ -21,7 +21,7 @@ Connection: close Content-Type: text/html Funny-head: yesyes --foo- +These data aren't actually sent to the client </data> </reply> diff --git a/tests/data/test1457 b/tests/data/test1457 index aad6d43d4..575748f46 100644 --- a/tests/data/test1457 +++ b/tests/data/test1457 @@ -29,7 +29,7 @@ http Check if %{stderr} and %{stdout} switch between stdout and stderr. </name> <command> -http://%HOSTIP:%HTTPPORT/1457 --write-out 'line1%{stderr}line2%{stdout}line3' +http://%HOSTIP:%HTTPPORT/1457 --silent --write-out 'line1%{stderr}line2%{stdout}line3' </command> </client> @@ -45,7 +45,6 @@ Content-Type: text/plain testdata line1line3 </stdout> -#note: as of now <stderr> doesn't actually exist in runtests.pl <stderr nonewline="yes"> line2 </stderr> diff --git a/tests/data/test1506 b/tests/data/test1506 index 815fef923..7377dd6e0 100644 --- a/tests/data/test1506 +++ b/tests/data/test1506 @@ -88,9 +88,13 @@ Accept: */* * Connection #2 to host server3.example.com left intact * Closing connection 0 * Connection #3 to host server4.example.com left intact +* Closing connection +* Closing connection +* Closing connection </file> <stripfile> $_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/)) +s/^(\* Closing connection) [123](?=\r?\n)/$1/ </stripfile> </verify> </testcase> diff --git a/tests/data/test1541 b/tests/data/test1541 new file mode 100644 index 000000000..e18bb47df --- /dev/null +++ b/tests/data/test1541 @@ -0,0 +1,34 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +multi-threaded +connection-sharing +</keywords> +</info> + +# Server-side +<reply> +</reply> + +# Client-side +<client> +<server> +http +</server> +<tool> +lib1541 +</tool> + <name> +connection sharing using 67 parallel threads for 7 seconds + </name> + <command> +http://%HOSTIP:%HTTPPORT/1 +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +</verify> +</testcase> diff --git a/tests/data/test1561 b/tests/data/test1561 index ff448c95f..69352fda2 100644 --- a/tests/data/test1561 +++ b/tests/data/test1561 @@ -18,6 +18,15 @@ Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Set-Cookie: super=secret; domain=example.com; path=/1561; secure; Set-Cookie: supersuper=secret; domain=example.com; path=/1561/login/; secure; +Set-Cookie: __Secure-SID=12345; Domain=example.com +Set-Cookie: __Secure-SID=12346; Secure; Domain=example.com +Set-Cookie: supersupersuper=secret; __Secure-SID=12346; Secure; Domain=example.com +Set-Cookie: __Host-SID=22345 +Set-Cookie: __Host-SID=22346; Secure +Set-Cookie: __Host-SID=22347; Domain=example.com +Set-Cookie: __Host-SID=22348; Domain=example.com; Path=/ +Set-Cookie: __Host-SID=22349; Secure; Domain=example.com; Path=/ +Set-Cookie: __Host-SID=12346; Secure; Path=/ Content-Length: 7 nomnom @@ -33,6 +42,14 @@ Set-Cookie: public=yes; domain=example.com; path=/foo; Set-Cookie: supersuper=secret; domain=example.com; path=/1561/login/en; Set-Cookie: supersuper=secret; domain=example.com; path=/1561/login; Set-Cookie: secureoverhttp=yes; domain=example.com; path=/1561; secure; +Set-Cookie: __Secure-SID=22345; Domain=example.com +Set-Cookie: __Secure-SID=22346; Secure; Domain=example.com +Set-Cookie: __Host-SID=32345 +Set-Cookie: __Host-SID=32346; Secure +Set-Cookie: __Host-SID=32347; Domain=example.com +Set-Cookie: __Host-SID=32348; Domain=example.com; Path=/ +Set-Cookie: __Host-SID=32349; Secure; Domain=example.com; Path=/ +Set-Cookie: __Host-SID=32350; Secure; Path=/ Content-Length: 7 nomnom @@ -77,6 +94,9 @@ Accept: */* # This file was generated by libcurl! Edit at your own risk. .example.com TRUE /foo FALSE 0 public yes +www.example.com FALSE / TRUE 0 __Host-SID 12346 +.example.com TRUE / TRUE 0 supersupersuper secret +.example.com TRUE / TRUE 0 __Secure-SID 12346 .example.com TRUE /1561/login/ TRUE 0 supersuper secret #HttpOnly_.example.com TRUE /15 FALSE 0 super secret </file> diff --git a/tests/data/test1654 b/tests/data/test1654 new file mode 100644 index 000000000..175076c8a --- /dev/null +++ b/tests/data/test1654 @@ -0,0 +1,58 @@ +<testcase> +<info> +<keywords> +unittest +alt-svc +altsvc +</keywords> +</info> + +<client> +<server> +none +</server> +<features> +unittest +alt-svc +</features> + +# This date is exactly "20190124 22:34:21" UTC +<setenv> +CURL_TIME=1548369261 +</setenv> +<name> +alt-svc +</name> +<command> +log/1654 +</command> +<tool> +unit1654 +</tool> +<file name="log/1654" mode="text"> +h2 example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 1 +# a comment +h2c example.com 443 h3 shiny.example.com 8443 "20291231 23:30:00" 0 1 + h1 example.com 443 h3 shiny.example.com 8443 "20121231 00:00:01" 0 1 + h3 example.com 443 h3 shiny.example.com 8443 "20131231 00:00:00" 0 1 + # also a comment +bad example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 1 +rubbish +</file> +</client> +<verify> +<file name="log/1654-out" mode="text"> +# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html +# This file was generated by libcurl! Edit at your own risk. +h2 example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 1 +h2c example.com 443 h3 shiny.example.com 8443 "20291231 23:30:00" 0 1 +h1 example.com 443 h3 shiny.example.com 8443 "20121231 00:00:01" 0 1 +h3 example.com 443 h3 shiny.example.com 8443 "20131231 00:00:00" 0 1 +h1 example.org 8080 h2 example.com 8080 "20190125 22:34:21" 0 0 +h1 2.example.org 8080 h3 2.example.org 8080 "20190125 22:34:21" 0 0 +h1 3.example.org 8080 h2 example.com 8080 "20190125 22:34:21" 0 0 +h1 3.example.org 8080 h3 yesyes.com 8080 "20190125 22:34:21" 0 0 +h2c example.org 80 h2 example.com 443 "20190124 22:36:21" 0 0 +</file> +</verify> +</testcase> diff --git a/tests/data/test1905 b/tests/data/test1905 new file mode 100644 index 000000000..0459b10b4 --- /dev/null +++ b/tests/data/test1905 @@ -0,0 +1,60 @@ +<testcase> +<info> +<keywords> +HTTP +cookies +FLUSH +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Funny-head: yesyes swsclose +Set-Cookie: foobar=name; +Set-Cookie: secondcookie=present; + +</data> +</reply> + +# Client-side +<client> +<server> +http +</server> + <name> +CURLOPT_COOKIELIST set to "FLUSH" of a shared cookie object + </name> +<tool> +lib1905 +</tool> +<command> +http://%HOSTIP:%HTTPPORT/we/want/1905 +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /we/want/1905 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol> +<file name="log/cookies1905" mode="text"> +# Netscape HTTP Cookie File +# https://curl.haxx.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +%HOSTIP FALSE /we/want/ FALSE 0 secondcookie present +%HOSTIP FALSE /we/want/ FALSE 0 foobar name +</file> +</verify> +</testcase> diff --git a/tests/data/test2056 b/tests/data/test2056 index f00e21204..5d2584eec 100644 --- a/tests/data/test2056 +++ b/tests/data/test2056 @@ -8,17 +8,7 @@ HTTP Negotiate auth (stub krb5) </info> # Server-side <reply> -<!-- First request, expect 401 Negotiate --> -<data> -HTTP/1.1 401 Authorization Required -Server: Microsoft-IIS/7.0 -Content-Type: text/html; charset=iso-8859-1 -WWW-Authenticate: Negotiate -Content-Length: 13 - -Not yet sir! -</data> -<!-- Second request, expect success in one shot --> +<!-- First request, expect success in one shot --> <data1> HTTP/1.1 200 Things are fine in server land Server: Microsoft-IIS/7.0 @@ -29,12 +19,6 @@ Content-Length: 15 Nice auth sir! </data1> <datacheck> -HTTP/1.1 401 Authorization Required -Server: Microsoft-IIS/7.0 -Content-Type: text/html; charset=iso-8859-1 -WWW-Authenticate: Negotiate -Content-Length: 13 - HTTP/1.1 200 Things are fine in server land Server: Microsoft-IIS/7.0 Content-Type: text/html; charset=iso-8859-1 @@ -75,10 +59,6 @@ CURL_STUB_GSS_CREDS="KRB5_Alice" <protocol> GET /2056 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Accept: */*
-
-GET /2056 HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
Authorization: Negotiate IktSQjVfQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjE6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==
Accept: */*
diff --git a/tests/data/test2057 b/tests/data/test2057 index 562505168..92d7824c1 100644 --- a/tests/data/test2057 +++ b/tests/data/test2057 @@ -8,17 +8,7 @@ HTTP Negotiate auth (stub ntlm) </info> # Server-side <reply> -<!-- First request, expect 401 Negotiate --> -<data> -HTTP/1.1 401 Authorization Required -Server: Microsoft-IIS/7.0 -Content-Type: text/html; charset=iso-8859-1 -WWW-Authenticate: Negotiate -Content-Length: 13 - -Not yet sir! -</data> -<!-- Second request, expect 401 (ntlm challenge) --> +<!-- First request, expect 401 (ntlm challenge) --> <data1> HTTP/1.1 401 Authorization Required Server: Microsoft-IIS/7.0 @@ -28,7 +18,7 @@ Content-Length: 19 Still not yet sir! </data1> -<!-- Third request, expect success --> +<!-- Second request, expect success --> <data2> HTTP/1.1 200 Things are fine in server land Server: Microsoft-IIS/7.0 @@ -42,12 +32,6 @@ Nice auth sir! HTTP/1.1 401 Authorization Required Server: Microsoft-IIS/7.0 Content-Type: text/html; charset=iso-8859-1 -WWW-Authenticate: Negotiate -Content-Length: 13 - -HTTP/1.1 401 Authorization Required -Server: Microsoft-IIS/7.0 -Content-Type: text/html; charset=iso-8859-1 WWW-Authenticate: Negotiate Qw== Content-Length: 19 @@ -91,10 +75,6 @@ CURL_STUB_GSS_CREDS="NTLM_Alice" <protocol> GET /2057 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Accept: */*
-
-GET /2057 HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
Authorization: Negotiate Ik5UTE1fQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjI6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==
Accept: */*
diff --git a/tests/data/test327 b/tests/data/test327 index 1aa672d0c..3a1c07162 100644 --- a/tests/data/test327 +++ b/tests/data/test327 @@ -31,7 +31,7 @@ Content-Type: text/html Funny-head: yesyes swsclose Set-Cookie: foobar=name; expires=Thu, 01 Jan 1970 00:00:00 GMT; -</data> +</data2> </reply> # Client-side diff --git a/tests/data/test331 b/tests/data/test331 new file mode 100644 index 000000000..54b86d2a1 --- /dev/null +++ b/tests/data/test331 @@ -0,0 +1,65 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +cookies +</keywords> +</info> + +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Content-Length: 4 +Set-Cookie: moo=yes; + +hej +</data> +<data2> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Content-Length: 0 +Funny-head: yesyes swsclose + +</data2> +</reply> + +# Client-side +<client> +<server> +http +</server> + <name> +HTTP with cookie using host name 'moo' + </name> + <command> +-x http://%HOSTIP:%HTTPPORT http://moo/we/want/331 -b none http://moo/we/want/3310002 +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET http://moo/we/want/331 HTTP/1.1
+Host: moo
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://moo/we/want/3310002 HTTP/1.1
+Host: moo
+Accept: */*
+Proxy-Connection: Keep-Alive
+Cookie: moo=yes
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test355 b/tests/data/test355 new file mode 100644 index 000000000..e9c4cb28f --- /dev/null +++ b/tests/data/test355 @@ -0,0 +1,57 @@ +<testcase> +<info> +<keywords> +HTTP +Alt-Svc +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<features> +alt-svc +</features> +<server> +http +</server> + <name> +load Alt-Svc from file and use + </name> + <command> +http://%HOSTIP:%HTTPPORT/355 --alt-svc "" +</command> +<file name="log/altsvc-355"> +h1 example.com 80 h1 %HOSTIP %HTTPPORT "20290222 22:19:28" 0 0 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /355 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test356 b/tests/data/test356 new file mode 100644 index 000000000..e2ac4860d --- /dev/null +++ b/tests/data/test356 @@ -0,0 +1,70 @@ +<testcase> +<info> +<keywords> +HTTP +Alt-Svc +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes +Alt-Svc: h1="nowhere.foo:81" + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<features> +debug +alt-svc +</features> +<server> +http +</server> + <name> +parse incoming Alt-Svc and save to file + </name> +<setenv> +# make debug-curl accept Alt-Svc over plain HTTP +CURL_ALTSVC_HTTP="yeah" +</setenv> + <command> +http://%HOSTIP:%HTTPPORT/356 --alt-svc "log/altsvc-356" +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /356 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol> +<stripfile> +# strip out the (dynamic) expire date from the file so that the rest +# matches +s/\"([^\"]*)\"/TIMESTAMP/ +</stripfile> +<file name="log/altsvc-356"> +# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html +# This file was generated by libcurl! Edit at your own risk. +h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0 +</file> +</verify> +</testcase> diff --git a/tests/data/test506 b/tests/data/test506 index 30f4aa9c0..8f06e0e4f 100644 --- a/tests/data/test506 +++ b/tests/data/test506 @@ -228,9 +228,6 @@ lock: share [Pigs in space]: 94 unlock: share [Pigs in space]: 95 GLOBAL_CLEANUP </stdout> -<stderr> -http://%HOSTIP:%HTTPPORT/506 -</stderr> <file name="log/jar506" mode="text"> # Netscape HTTP Cookie File # https://curl.haxx.se/docs/http-cookies.html diff --git a/tests/data/test578 b/tests/data/test578 index abbe49a3c..788ed72f0 100644 --- a/tests/data/test578 +++ b/tests/data/test578 @@ -38,7 +38,7 @@ lib578 HTTP POST lower than MAX_INITIAL_POST_SIZE with progress callback </name> <command> -http://%HOSTIP:%HTTPPORT/500 log/ip578 +http://%HOSTIP:%HTTPPORT/578 log/ip578 </command> </client> diff --git a/tests/data/test597 b/tests/data/test597 index 458bb6453..3eb9ed8b8 100644 --- a/tests/data/test597 +++ b/tests/data/test597 @@ -31,7 +31,6 @@ ftp://%HOSTIP:%FTPPORT USER anonymous
PASS ftp@example.com
PWD
-QUIT
</protocol> </verify> </testcase> diff --git a/tests/data/test658 b/tests/data/test658 index c75293c6d..2ed6d6429 100644 --- a/tests/data/test658 +++ b/tests/data/test658 @@ -3,6 +3,7 @@ <keywords> HTTP HTTP GET +CURLOPT_CURLU </keywords> </info> <reply> @@ -29,7 +30,7 @@ http lib658 </tool> <name> -HTTP GET +Pass URL to libcurl with CURLOPT_CURLU </name> <command> http://%HOSTIP:%HTTPPORT/658 @@ -45,6 +46,7 @@ GET /658 HTTP/1.1 Host: %HOSTIP:%HTTPPORT
Accept: */*
+</protocol> </verify> </testcase> diff --git a/tests/data/test659 b/tests/data/test659 new file mode 100644 index 000000000..43e1aaf92 --- /dev/null +++ b/tests/data/test659 @@ -0,0 +1,54 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +CURLOPT_CURLU +proxy +</keywords> +</info> +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- +</data> +</reply> +<client> +<server> +http +</server> +<tool> +lib659 +</tool> +<name> +CURLOPT_CURLU without the path set - over proxy + </name> + <command> +http://%HOSTIP:%HTTPPORT +</command> +</client> + +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET http://www.example.com:80/ HTTP/1.1
+Host: www.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol> +</verify> + +</testcase> diff --git a/tests/data/test8 b/tests/data/test8 index e6d0f500e..2fc190060 100644 --- a/tests/data/test8 +++ b/tests/data/test8 @@ -46,7 +46,6 @@ Set-Cookie: trailingspace = removed; path=/we/want; Set-Cookie: nocookie=yes; path=/WE; Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad; Set-Cookie: partialip=nono; domain=.0.0.1; -Set-Cookie: chocolate=chip; domain=curl; path=/we/want; </file> <precheck> |