diff options
Diffstat (limited to 'tests/data')
269 files changed, 6192 insertions, 938 deletions
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt index 883d58358..dfe0fe2f8 100644 --- a/tests/data/CMakeLists.txt +++ b/tests/data/CMakeLists.txt @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -18,11 +18,9 @@ # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # +# SPDX-License-Identifier: curl +# ########################################################################### # Loads 'TESTCASES' from for the 'make show' target in runtests.pl transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") - -# Prints all available test cases. Do not quote TESTCASES, it must be displayed -# as a space-separated string rather than comma-separated (a list in CMake). -add_custom_target(show COMMAND echo ${TESTCASES}) diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 371ebc481..d4a451b1d 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -1,3 +1,27 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### +# # This file can be used to specify test cases that should not run when all # test cases are run by runtests.pl. Just add the plain test case numbers, one # per line. @@ -42,27 +66,43 @@ %if hyper 265 266 -357 -358 -359 565 579 -580 -581 587 -670 -671 -672 -673 -718 +# 1021 re-added here due to flakiness 1021 +1117 1417 1533 1540 1591 -1700 -1701 -1702 -1800 +1941 +1942 +1943 +2301 +2302 %endif 2043 +# Tests that are disabled here for rustls are SUPPOSED to work +%if rustls +312 +313 +400 +401 +403 +404 +406 +407 +408 +409 +1112 +1272 +%endif +# The CRL test doesn't work with wolfSSL +%if wolfssl +313 +%endif +# The CRL test doesn't work with BearSSL +%if bearssl +313 +%endif diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 2e10bd4d1..e627f16c5 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -18,6 +18,8 @@ # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # +# SPDX-License-Identifier: curl +# ########################################################################### iall: install: @@ -27,21 +29,3 @@ test: include Makefile.inc EXTRA_DIST = $(TESTCASES) DISABLED CMakeLists.txt - -filecheck: - @mkdir test-place; \ - cp "$(top_srcdir)"/tests/data/test[0-9]* test-place/; \ - rm -f test-place/*~; \ - for f in $(EXTRA_DIST); do \ - if test -f "$(top_srcdir)/tests/data/$$f"; then \ - rm -f "test-place/$$f"; \ - else \ - echo "$$f is listed but missing!"; \ - fi \ - done; \ - echo "Local files not present in EXTRA_DIST:" ; \ - ls test-place; \ - ! ls test-place | grep . >/dev/null ; \ - RC=$$? ; \ - rm -rf test-place ; \ - exit $$RC diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in index 813810851..f16966f9a 100644 --- a/tests/data/Makefile.in +++ b/tests/data/Makefile.in @@ -34,6 +34,8 @@ # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # +# SPDX-License-Identifier: curl +# ########################################################################### VPATH = @srcdir@ am__is_gnu_make = { \ @@ -111,15 +113,13 @@ build_triplet = @build@ host_triplet = @host@ subdir = tests/data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ - $(top_srcdir)/m4/curl-amissl.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/curl-amissl.m4 \ $(top_srcdir)/m4/curl-bearssl.m4 \ $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-gnutls.m4 \ - $(top_srcdir)/m4/curl-mbedtls.m4 \ - $(top_srcdir)/m4/curl-mesalink.m4 $(top_srcdir)/m4/curl-nss.m4 \ + $(top_srcdir)/m4/curl-mbedtls.m4 $(top_srcdir)/m4/curl-nss.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ $(top_srcdir)/m4/curl-override.m4 \ $(top_srcdir)/m4/curl-reentrant.m4 \ @@ -211,6 +211,7 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_PLIST_VERSION = @CURL_PLIST_VERSION@ CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ @@ -228,6 +229,7 @@ ENABLE_STATIC = @ENABLE_STATIC@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ GCOV = @GCOV@ GREP = @GREP@ @@ -285,6 +287,7 @@ PKGADD_VENDOR = @PKGADD_VENDOR@ PKGCONFIG = @PKGCONFIG@ RANDOM_FILE = @RANDOM_FILE@ RANLIB = @RANLIB@ +RC = @RC@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -303,12 +306,13 @@ USE_LIBRTMP = @USE_LIBRTMP@ USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ -USE_MESALINK = @USE_MESALINK@ +USE_MSH3 = @USE_MSH3@ USE_NGHTTP2 = @USE_NGHTTP2@ USE_NGHTTP3 = @USE_NGHTTP3@ USE_NGTCP2 = @USE_NGTCP2@ USE_NGTCP2_CRYPTO_GNUTLS = @USE_NGTCP2_CRYPTO_GNUTLS@ USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ +USE_NGTCP2_CRYPTO_WOLFSSL = @USE_NGTCP2_CRYPTO_WOLFSSL@ USE_NSS = @USE_NSS@ USE_OPENLDAP = @USE_OPENLDAP@ USE_QUICHE = @USE_QUICHE@ @@ -375,7 +379,6 @@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -423,16 +426,17 @@ test334 test335 test336 test337 test338 test339 test340 test341 test342 \ test343 test344 test345 test346 test347 test348 test349 test350 test351 \ test352 test353 test354 test355 test356 test357 test358 test359 test360 \ test361 test362 test363 test364 test365 test366 test367 test368 test369 \ -test370 test371 \ -\ -test392 test393 test394 test395 test396 test397 \ +test370 test371 test372 test373 test374 test375 test376 test378 test379 \ +test380 test381 test383 test384 test385 test386 test387 test388 test389 \ +test390 test391 test392 test393 test394 test395 test396 test397 test398 \ +test399 test400 test401 test402 test403 test404 test405 test406 test407 \ +test408 test409 test410 test411 test412 test413 test414 test415 \ \ -test400 test401 test402 test403 test404 test405 test406 test407 test408 \ -test409 test410 \ +test430 test431 test432 test433 test434 test435 test436 \ \ -test430 test431 test432 test433 test434 test435 \ +test440 test441 test442 test443 test444 test445 \ \ -test490 test491 test492 test493 test494 \ +test490 test491 test492 test493 test494 test495 test496 \ \ test500 test501 test502 test503 test504 test505 test506 test507 test508 \ test509 test510 test511 test512 test513 test514 test515 test516 test517 \ @@ -450,10 +454,11 @@ test608 test609 test610 test611 test612 test613 test614 test615 test616 \ 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 test645 test646 test647 test648 test649 test650 test651 \ +test643 test644 test645 test646 test647 test648 test649 test650 test651 \ test652 test653 test654 test655 test656 test658 test659 test660 test661 \ test662 test663 test664 test665 test666 test667 test668 test669 \ test670 test671 test672 test673 test674 test675 test676 test677 test678 \ +test679 test680 test681 test682 test683 test684 test685 \ \ test700 test701 test702 test703 test704 test705 test706 test707 test708 \ test709 test710 test711 test712 test713 test714 test715 test716 test717 \ @@ -469,7 +474,7 @@ test854 test855 test856 test857 test858 test859 test860 test861 test862 \ test863 test864 test865 test866 test867 test868 test869 test870 test871 \ test872 test873 test874 test875 test876 test877 test878 test879 test880 \ test881 test882 test883 test884 test885 test886 test887 test888 test889 \ -test890 test891 test892 test893 test894 test895 test896 test897 \ +test890 test891 test892 test893 test894 test895 test896 test897 test898 \ \ test900 test901 test902 test903 test904 test905 test906 test907 test908 \ test909 test910 test911 test912 test913 test914 test915 test916 test917 \ @@ -479,7 +484,7 @@ test936 test937 test938 test939 test940 test941 test942 test943 test944 \ test945 test946 test947 test948 test949 test950 test951 test952 test953 \ test954 test955 test956 test957 test958 test959 test960 test961 test962 \ test963 test964 test965 test966 test967 test968 test969 test970 test971 \ -test972 \ +test972 test973 test974 test975 test976 test977 \ \ test980 test981 test982 test983 test984 test985 test986 \ \ @@ -519,7 +524,7 @@ test1240 test1241 test1242 test1243 test1244 test1245 test1246 test1247 \ test1248 test1249 test1250 test1251 test1252 test1253 test1254 test1255 \ test1256 test1257 test1258 test1259 test1260 test1261 test1262 test1263 \ test1264 test1265 test1266 test1267 test1268 test1269 test1270 test1271 \ -test1272 test1273 \ +test1272 test1273 test1274 test1275 \ \ test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \ test1288 test1289 test1290 test1291 test1292 test1293 test1294 test1295 \ @@ -544,40 +549,46 @@ test1432 test1433 test1434 test1435 test1436 test1437 test1438 test1439 \ test1440 test1441 test1442 test1443 test1444 test1445 test1446 test1447 \ test1448 test1449 test1450 test1451 test1452 test1453 test1454 test1455 \ test1456 test1457 test1458 test1459 test1460 test1461 test1462 test1463 \ -test1464 test1465 test1466 \ +test1464 test1465 test1466 test1467 test1468 \ \ test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \ test1516 test1517 test1518 test1519 test1520 test1521 test1522 test1523 \ test1524 test1525 test1526 test1527 test1528 test1529 test1530 test1531 \ test1532 test1533 test1534 test1535 test1536 test1537 test1538 test1539 \ -test1540 test1542 \ +test1540 test1542 test1543 \ \ test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \ test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \ test1566 test1567 test1568 test1569 test1570 \ \ -test1590 test1591 test1592 test1593 test1594 test1595 test1596 \ +test1590 test1591 test1592 test1593 test1594 test1595 test1596 test1597 \ \ test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \ -test1608 test1609 test1610 test1611 test1612 test1613 \ +test1608 test1609 test1610 test1611 test1612 test1613 test1614 \ \ test1620 test1621 \ \ -test1630 test1631 test1632 test1633 test1634 \ +test1630 test1631 test1632 test1633 test1634 test1635 \ \ test1650 test1651 test1652 test1653 test1654 test1655 \ test1660 test1661 \ \ +test1670 test1671 \ +\ +test1680 test1681 test1682 test1683 \ +\ test1700 test1701 test1702 test1703 \ \ test1800 test1801 \ \ test1904 test1905 test1906 test1907 \ test1908 test1909 test1910 test1911 test1912 test1913 test1914 test1915 \ -test1916 test1917 test1918 \ +test1916 test1917 test1918 test1919 \ \ -test1933 test1934 test1935 test1936 test1937 test1938 test1939 \ +test1933 test1934 test1935 test1936 test1937 test1938 test1939 test1940 \ +test1941 test1942 test1943 test1944 test1945 test1946 test1947 test1948 \ +test1955 \ \ test2000 test2001 test2002 test2003 test2004 \ \ @@ -595,10 +606,12 @@ test2100 \ \ test2200 test2201 test2202 test2203 test2204 test2205 \ \ +test2300 test2301 test2302 test2303 \ +\ test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 \ test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015 \ test3016 test3017 test3018 test3019 test3020 test3021 test3022 test3023 \ -test3024 test3025 +test3024 test3025 test3026 test3027 # TESTCASES are taken from Makefile.inc @@ -615,9 +628,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/data/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/data/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/data/Makefile + $(AUTOMAKE) --foreign tests/data/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -804,7 +817,7 @@ uninstall-am: # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -817,29 +830,13 @@ uninstall-am: # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # +# SPDX-License-Identifier: curl +# ########################################################################### iall: install: test: -filecheck: - @mkdir test-place; \ - cp "$(top_srcdir)"/tests/data/test[0-9]* test-place/; \ - rm -f test-place/*~; \ - for f in $(EXTRA_DIST); do \ - if test -f "$(top_srcdir)/tests/data/$$f"; then \ - rm -f "test-place/$$f"; \ - else \ - echo "$$f is listed but missing!"; \ - fi \ - done; \ - echo "Local files not present in EXTRA_DIST:" ; \ - ls test-place; \ - ! ls test-place | grep . >/dev/null ; \ - RC=$$? ; \ - rm -rf test-place ; \ - exit $$RC - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 9e0372b6e..cbb27973c 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -18,6 +18,8 @@ # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # +# SPDX-License-Identifier: curl +# ########################################################################### # this list is in numerical order @@ -61,16 +63,17 @@ test334 test335 test336 test337 test338 test339 test340 test341 test342 \ test343 test344 test345 test346 test347 test348 test349 test350 test351 \ test352 test353 test354 test355 test356 test357 test358 test359 test360 \ test361 test362 test363 test364 test365 test366 test367 test368 test369 \ -test370 test371 \ -\ -test392 test393 test394 test395 test396 test397 \ +test370 test371 test372 test373 test374 test375 test376 test378 test379 \ +test380 test381 test383 test384 test385 test386 test387 test388 test389 \ +test390 test391 test392 test393 test394 test395 test396 test397 test398 \ +test399 test400 test401 test402 test403 test404 test405 test406 test407 \ +test408 test409 test410 test411 test412 test413 test414 test415 \ \ -test400 test401 test402 test403 test404 test405 test406 test407 test408 \ -test409 test410 \ +test430 test431 test432 test433 test434 test435 test436 \ \ -test430 test431 test432 test433 test434 test435 \ +test440 test441 test442 test443 test444 test445 \ \ -test490 test491 test492 test493 test494 \ +test490 test491 test492 test493 test494 test495 test496 \ \ test500 test501 test502 test503 test504 test505 test506 test507 test508 \ test509 test510 test511 test512 test513 test514 test515 test516 test517 \ @@ -88,10 +91,11 @@ test608 test609 test610 test611 test612 test613 test614 test615 test616 \ 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 test645 test646 test647 test648 test649 test650 test651 \ +test643 test644 test645 test646 test647 test648 test649 test650 test651 \ test652 test653 test654 test655 test656 test658 test659 test660 test661 \ test662 test663 test664 test665 test666 test667 test668 test669 \ test670 test671 test672 test673 test674 test675 test676 test677 test678 \ +test679 test680 test681 test682 test683 test684 test685 \ \ test700 test701 test702 test703 test704 test705 test706 test707 test708 \ test709 test710 test711 test712 test713 test714 test715 test716 test717 \ @@ -107,7 +111,7 @@ test854 test855 test856 test857 test858 test859 test860 test861 test862 \ test863 test864 test865 test866 test867 test868 test869 test870 test871 \ test872 test873 test874 test875 test876 test877 test878 test879 test880 \ test881 test882 test883 test884 test885 test886 test887 test888 test889 \ -test890 test891 test892 test893 test894 test895 test896 test897 \ +test890 test891 test892 test893 test894 test895 test896 test897 test898 \ \ test900 test901 test902 test903 test904 test905 test906 test907 test908 \ test909 test910 test911 test912 test913 test914 test915 test916 test917 \ @@ -117,7 +121,7 @@ test936 test937 test938 test939 test940 test941 test942 test943 test944 \ test945 test946 test947 test948 test949 test950 test951 test952 test953 \ test954 test955 test956 test957 test958 test959 test960 test961 test962 \ test963 test964 test965 test966 test967 test968 test969 test970 test971 \ -test972 \ +test972 test973 test974 test975 test976 test977 \ \ test980 test981 test982 test983 test984 test985 test986 \ \ @@ -157,7 +161,7 @@ test1240 test1241 test1242 test1243 test1244 test1245 test1246 test1247 \ test1248 test1249 test1250 test1251 test1252 test1253 test1254 test1255 \ test1256 test1257 test1258 test1259 test1260 test1261 test1262 test1263 \ test1264 test1265 test1266 test1267 test1268 test1269 test1270 test1271 \ -test1272 test1273 \ +test1272 test1273 test1274 test1275 \ \ test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \ test1288 test1289 test1290 test1291 test1292 test1293 test1294 test1295 \ @@ -182,40 +186,46 @@ test1432 test1433 test1434 test1435 test1436 test1437 test1438 test1439 \ test1440 test1441 test1442 test1443 test1444 test1445 test1446 test1447 \ test1448 test1449 test1450 test1451 test1452 test1453 test1454 test1455 \ test1456 test1457 test1458 test1459 test1460 test1461 test1462 test1463 \ -test1464 test1465 test1466 \ +test1464 test1465 test1466 test1467 test1468 \ \ test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \ test1516 test1517 test1518 test1519 test1520 test1521 test1522 test1523 \ test1524 test1525 test1526 test1527 test1528 test1529 test1530 test1531 \ test1532 test1533 test1534 test1535 test1536 test1537 test1538 test1539 \ -test1540 test1542 \ +test1540 test1542 test1543 \ \ test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \ test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \ test1566 test1567 test1568 test1569 test1570 \ \ -test1590 test1591 test1592 test1593 test1594 test1595 test1596 \ +test1590 test1591 test1592 test1593 test1594 test1595 test1596 test1597 \ \ test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \ -test1608 test1609 test1610 test1611 test1612 test1613 \ +test1608 test1609 test1610 test1611 test1612 test1613 test1614 \ \ test1620 test1621 \ \ -test1630 test1631 test1632 test1633 test1634 \ +test1630 test1631 test1632 test1633 test1634 test1635 \ \ test1650 test1651 test1652 test1653 test1654 test1655 \ test1660 test1661 \ \ +test1670 test1671 \ +\ +test1680 test1681 test1682 test1683 \ +\ test1700 test1701 test1702 test1703 \ \ test1800 test1801 \ \ test1904 test1905 test1906 test1907 \ test1908 test1909 test1910 test1911 test1912 test1913 test1914 test1915 \ -test1916 test1917 test1918 \ +test1916 test1917 test1918 test1919 \ \ -test1933 test1934 test1935 test1936 test1937 test1938 test1939 \ +test1933 test1934 test1935 test1936 test1937 test1938 test1939 test1940 \ +test1941 test1942 test1943 test1944 test1945 test1946 test1947 test1948 \ +test1955 \ \ test2000 test2001 test2002 test2003 test2004 \ \ @@ -233,7 +243,9 @@ test2100 \ \ test2200 test2201 test2202 test2203 test2204 test2205 \ \ +test2300 test2301 test2302 test2303 \ +\ test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 \ test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015 \ test3016 test3017 test3018 test3019 test3020 test3021 test3022 test3023 \ -test3024 test3025 +test3024 test3025 test3026 test3027 diff --git a/tests/data/test1001 b/tests/data/test1001 index 59d2ff869..df42f7134 100644 --- a/tests/data/test1001 +++ b/tests/data/test1001 @@ -59,7 +59,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test1002 b/tests/data/test1002 index d33f35b9c..ca58be6f4 100644 --- a/tests/data/test1002 +++ b/tests/data/test1002 @@ -58,7 +58,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test1004 b/tests/data/test1004 index cb2b6d69c..3b75081bd 100644 --- a/tests/data/test1004 +++ b/tests/data/test1004 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +proxy +</features> <server> http </server> diff --git a/tests/data/test1008 b/tests/data/test1008 index b115c31ff..fee52702f 100644 --- a/tests/data/test1008 +++ b/tests/data/test1008 @@ -7,6 +7,7 @@ HTTP CONNECT HTTP proxy HTTP proxy NTLM auth chunked Transfer-Encoding +NTLM </keywords> </info> @@ -88,24 +89,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response - </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> +</name> +<command> http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -119,7 +110,7 @@ Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1021 b/tests/data/test1021 index 9afe95f4b..bb34615fd 100644 --- a/tests/data/test1021 +++ b/tests/data/test1021 @@ -7,6 +7,7 @@ HTTP CONNECT HTTP proxy HTTP proxy NTLM auth --proxy-anyauth +NTLM </keywords> </info> # Server-side @@ -17,7 +18,7 @@ HTTP/1.1 407 Authorization Required to proxy me my dear swsclose Proxy-Authenticate: NTLM
Content-Length: 16
Connection: close
- +
data to discard </connect> @@ -26,7 +27,7 @@ data to discard HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 28
- +
27 bytes and newline to ign </connect1001> @@ -64,11 +65,11 @@ HTTP/1.1 407 Authorization Required to proxy me my dear swsclose Proxy-Authenticate: NTLM
Content-Length: 16
Connection: close
- +
HTTP/1.1 407 Authorization Required to proxy me my dear
Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
Content-Length: 28
- +
HTTP/1.1 200 Things are fine in proxy land
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
@@ -93,24 +94,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close - </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> +</name> +<command> http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -129,7 +120,7 @@ Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1034 b/tests/data/test1034 index 565a1b728..ec41651a2 100644 --- a/tests/data/test1034 +++ b/tests/data/test1034 @@ -25,6 +25,7 @@ none <features> idn http +proxy </features> <setenv> LC_ALL= diff --git a/tests/data/test1035 b/tests/data/test1035 index a2b98cc94..73d8aefed 100644 --- a/tests/data/test1035 +++ b/tests/data/test1035 @@ -23,6 +23,7 @@ none <features> idn http +proxy </features> <setenv> LC_ALL= diff --git a/tests/data/test1048 b/tests/data/test1048 index 5ed267b55..e81e19f26 100644 --- a/tests/data/test1048 +++ b/tests/data/test1048 @@ -7,7 +7,6 @@ IPv6 PASV LIST --interface -IPv6 </keywords> </info> diff --git a/tests/data/test1053 b/tests/data/test1053 index bd5de2568..06abcf1fb 100644 --- a/tests/data/test1053 +++ b/tests/data/test1053 @@ -51,6 +51,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1064 b/tests/data/test1064 index 81014845f..1f5b4526f 100644 --- a/tests/data/test1064 +++ b/tests/data/test1064 @@ -27,7 +27,7 @@ still ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test1065 b/tests/data/test1065 index 8bef0e1e0..02e9a8565 100644 --- a/tests/data/test1065 +++ b/tests/data/test1065 @@ -28,7 +28,7 @@ still ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test1095 b/tests/data/test1095 index efb8413b2..d4cc082d1 100644 --- a/tests/data/test1095 +++ b/tests/data/test1095 @@ -73,7 +73,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: Digest username="testuser", realm="test \"this\" realm!!", nonce="1053604145", uri="/%TESTNUMBER", response="a1c7931ece9e8617bae2715045e4f49f"
+Authorization: Digest username="testuser", realm="test \"this\" realm!!", nonce="1053604145", uri="/%TESTNUMBER", response="df3246f44d2bc8de0e9f8fc4d7cf6e95"
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test1105 b/tests/data/test1105 index a06a05173..396933838 100644 --- a/tests/data/test1105 +++ b/tests/data/test1105 @@ -11,15 +11,18 @@ cookiejar # Server-side <reply> <data> -HTTP/1.1 200 OK -Date: Tue, 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: mismatch=this; domain=127.0.0.1; path="/silly/"; -Set-Cookie: partmatch=present; domain=.0.0.1; path=/; - +HTTP/1.1 200 OK
+Date: Tue, 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: mismatch=this; domain=127.0.0.1; path="/silly/";
+Set-Cookie: partmatch=present; domain=.0.0.1; path=/;
+Set-Cookie: foo bar=barfoo
+Set-Cookie: bar foo=
+Set-Cookie: bar=foo bar
+
</data> </reply> diff --git a/tests/data/test1115 b/tests/data/test1115 index 315fce3fc..f14182c87 100644 --- a/tests/data/test1115 +++ b/tests/data/test1115 @@ -25,7 +25,7 @@ Content-Length: 0 # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test1116 b/tests/data/test1116 index 7a883bfe1..3543e751b 100644 --- a/tests/data/test1116 +++ b/tests/data/test1116 @@ -41,6 +41,9 @@ chunky-trailer: header data another-header: yes
%endif </datacheck> +<servercmd> +writedelay: 10 +</servercmd> </reply> # diff --git a/tests/data/test1117 b/tests/data/test1117 index 50466aa32..405aa861e 100644 --- a/tests/data/test1117 +++ b/tests/data/test1117 @@ -31,7 +31,7 @@ partial body </data1> <servercmd> -writedelay: 1 +writedelay: 1000 </servercmd> </reply> diff --git a/tests/data/test1133 b/tests/data/test1133 index cd15f549f..ae6c323ac 100644 --- a/tests/data/test1133 +++ b/tests/data/test1133 @@ -19,6 +19,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1135 b/tests/data/test1135 index 37a55427f..e0aae514f 100644 --- a/tests/data/test1135 +++ b/tests/data/test1135 @@ -28,83 +28,94 @@ Verify CURL_EXTERN order <verify> <stdout> -CURL_EXTERN int curl_strequal(const char *s1, const char *s2); -CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n); -CURL_EXTERN curl_mime *curl_mime_init(CURL *easy); -CURL_EXTERN void curl_mime_free(curl_mime *mime); -CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime); -CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name); -CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part, -CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype); -CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part, -CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part, -CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part, -CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part, -CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part, -CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part, -CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, -CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, -CURL_EXTERN void curl_formfree(struct curl_httppost *form); -CURL_EXTERN char *curl_getenv(const char *variable); -CURL_EXTERN char *curl_version(void); -CURL_EXTERN char *curl_easy_escape(CURL *handle, -CURL_EXTERN char *curl_escape(const char *string, -CURL_EXTERN char *curl_easy_unescape(CURL *handle, -CURL_EXTERN char *curl_unescape(const char *string, -CURL_EXTERN void curl_free(void *p); -CURL_EXTERN CURLcode curl_global_init(long flags); -CURL_EXTERN CURLcode curl_global_init_mem(long flags, -CURL_EXTERN void curl_global_cleanup(void); -CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name, -CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, -CURL_EXTERN void curl_slist_free_all(struct curl_slist *); -CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); -CURL_EXTERN CURLSH *curl_share_init(void); -CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); -CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); -CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); -CURL_EXTERN const char *curl_easy_strerror(CURLcode); -CURL_EXTERN const char *curl_share_strerror(CURLSHcode); -CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); -CURL_EXTERN CURL *curl_easy_init(void); -CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); -CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); -CURL_EXTERN void curl_easy_cleanup(CURL *curl); -CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); -CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); -CURL_EXTERN void curl_easy_reset(CURL *curl); -CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, -CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, -CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); -CURL_EXTERN int curl_mprintf(const char *format, ...); -CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); -CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, -CURL_EXTERN int curl_mvprintf(const char *format, va_list args); -CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); -CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, -CURL_EXTERN char *curl_maprintf(const char *format, ...); -CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); -CURL_EXTERN CURLM *curl_multi_init(void); -CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle); -CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); -CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, -CURL_EXTERN const char *curl_multi_strerror(CURLMcode); -CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, -CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, -CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, -CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, -CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, +CURL_EXTERN int curl_strequal +CURL_EXTERN int curl_strnequal +CURL_EXTERN curl_mime *curl_mime_init +CURL_EXTERN void curl_mime_free +CURL_EXTERN curl_mimepart *curl_mime_addpart +CURL_EXTERN CURLcode curl_mime_name +CURL_EXTERN CURLcode curl_mime_filename +CURL_EXTERN CURLcode curl_mime_type +CURL_EXTERN CURLcode curl_mime_encoder +CURL_EXTERN CURLcode curl_mime_data +CURL_EXTERN CURLcode curl_mime_filedata +CURL_EXTERN CURLcode curl_mime_data_cb +CURL_EXTERN CURLcode curl_mime_subparts +CURL_EXTERN CURLcode curl_mime_headers +CURL_EXTERN CURLFORMcode curl_formadd +CURL_EXTERN int curl_formget +CURL_EXTERN void curl_formfree +CURL_EXTERN char *curl_getenv +CURL_EXTERN char *curl_version +CURL_EXTERN char *curl_easy_escape +CURL_EXTERN char *curl_escape +CURL_EXTERN char *curl_easy_unescape +CURL_EXTERN char *curl_unescape +CURL_EXTERN void curl_free +CURL_EXTERN CURLcode curl_global_init +CURL_EXTERN CURLcode curl_global_init_mem +CURL_EXTERN void curl_global_cleanup +CURL_EXTERN CURLsslset curl_global_sslset +CURL_EXTERN struct curl_slist *curl_slist_append +CURL_EXTERN void curl_slist_free_all +CURL_EXTERN time_t curl_getdate +CURL_EXTERN CURLSH *curl_share_init +CURL_EXTERN CURLSHcode curl_share_setopt +CURL_EXTERN CURLSHcode curl_share_cleanup +CURL_EXTERN curl_version_info_data *curl_version_info +CURL_EXTERN const char *curl_easy_strerror +CURL_EXTERN const char *curl_share_strerror +CURL_EXTERN CURLcode curl_easy_pause +CURL_EXTERN CURL *curl_easy_init +CURL_EXTERN CURLcode curl_easy_setopt +CURL_EXTERN CURLcode curl_easy_perform +CURL_EXTERN void curl_easy_cleanup +CURL_EXTERN CURLcode curl_easy_getinfo +CURL_EXTERN CURL *curl_easy_duphandle +CURL_EXTERN void curl_easy_reset +CURL_EXTERN CURLcode curl_easy_recv +CURL_EXTERN CURLcode curl_easy_send +CURL_EXTERN CURLcode curl_easy_upkeep +CURL_EXTERN int curl_mprintf +CURL_EXTERN int curl_mfprintf +CURL_EXTERN int curl_msprintf +CURL_EXTERN int curl_msnprintf +CURL_EXTERN int curl_mvprintf +CURL_EXTERN int curl_mvfprintf +CURL_EXTERN int curl_mvsprintf +CURL_EXTERN int curl_mvsnprintf +CURL_EXTERN char *curl_maprintf +CURL_EXTERN char *curl_mvaprintf +CURL_EXTERN CURLM *curl_multi_init +CURL_EXTERN CURLMcode curl_multi_add_handle +CURL_EXTERN CURLMcode curl_multi_remove_handle +CURL_EXTERN CURLMcode curl_multi_fdset +CURL_EXTERN CURLMcode curl_multi_wait +CURL_EXTERN CURLMcode curl_multi_poll +CURL_EXTERN CURLMcode curl_multi_wakeup +CURL_EXTERN CURLMcode curl_multi_perform +CURL_EXTERN CURLMcode curl_multi_cleanup +CURL_EXTERN CURLMsg *curl_multi_info_read +CURL_EXTERN const char *curl_multi_strerror +CURL_EXTERN CURLMcode curl_multi_socket +CURL_EXTERN CURLMcode curl_multi_socket_action +CURL_EXTERN CURLMcode curl_multi_socket_all +CURL_EXTERN CURLMcode curl_multi_timeout +CURL_EXTERN CURLMcode curl_multi_setopt +CURL_EXTERN CURLMcode curl_multi_assign +CURL_EXTERN char *curl_pushheader_bynum +CURL_EXTERN char *curl_pushheader_byname +CURL_EXTERN CURLU *curl_url +CURL_EXTERN void curl_url_cleanup +CURL_EXTERN CURLU *curl_url_dup +CURL_EXTERN CURLUcode curl_url_get +CURL_EXTERN CURLUcode curl_url_set +CURL_EXTERN const char *curl_url_strerror +CURL_EXTERN const struct curl_easyoption *curl_easy_option_by_name +CURL_EXTERN const struct curl_easyoption *curl_easy_option_by_id +CURL_EXTERN const struct curl_easyoption *curl_easy_option_next +CURL_EXTERN CURLHcode curl_easy_header +CURL_EXTERN struct curl_header *curl_easy_nextheader </stdout> </verify> diff --git a/tests/data/test1158 b/tests/data/test1158 index 3771f5d0b..3352ba058 100644 --- a/tests/data/test1158 +++ b/tests/data/test1158 @@ -19,6 +19,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1185 b/tests/data/test1185 index 47b4f22aa..eb672efa4 100644 --- a/tests/data/test1185 +++ b/tests/data/test1185 @@ -16,7 +16,7 @@ checksrc </name> <command type="perl"> -%SRCDIR/../lib/checksrc.pl log/code%TESTNUMBER.c +%SRCDIR/../scripts/checksrc.pl log/code%TESTNUMBER.c </command> <file name="log/code%TESTNUMBER.c"> /* test source code diff --git a/tests/data/test1186 b/tests/data/test1186 index e4662b697..8b3834cda 100644 --- a/tests/data/test1186 +++ b/tests/data/test1186 @@ -19,6 +19,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1187 b/tests/data/test1187 index 53abf908f..a8be5c1e4 100644 --- a/tests/data/test1187 +++ b/tests/data/test1187 @@ -14,6 +14,9 @@ MULTIPART # # Client-side <client> +<features> +Mime +</features> <server> smtp </server> diff --git a/tests/data/test1189 b/tests/data/test1189 index 229e443d9..c7f21d6f8 100644 --- a/tests/data/test1189 +++ b/tests/data/test1189 @@ -19,6 +19,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1210 b/tests/data/test1210 index 037eb16d8..89cfe61ea 100644 --- a/tests/data/test1210 +++ b/tests/data/test1210 @@ -39,7 +39,7 @@ HTTP GET with -J without Content-Disposition CURL_TESTDIR=%PWD/log </setenv> <command option="no-output,no-include"> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O +http://%HOSTIP:%HTTPPORT/%TESTNUMBER?junk -J -O </command> </client> @@ -47,7 +47,7 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O # Verify data after the test has been "shot" <verify> <protocol> -GET /%TESTNUMBER HTTP/1.1
+GET /%TESTNUMBER?junk HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test1212 b/tests/data/test1212 index 5a9308971..d445f9376 100644 --- a/tests/data/test1212 +++ b/tests/data/test1212 @@ -23,6 +23,9 @@ boo # Client-side <client> +<features> +proxy +</features> <server> http </server> diff --git a/tests/data/test1215 b/tests/data/test1215 index 02e0681a9..6fc59d38b 100644 --- a/tests/data/test1215 +++ b/tests/data/test1215 @@ -6,6 +6,7 @@ HTTP HTTP GET HTTP NTLM auth HTTP proxy +NTLM </keywords> </info> # Server-side @@ -60,27 +61,17 @@ Finally, this is the real page! NTLM SSL !SSPI -debug proxy </features> <server> http </server> - <name> +<name> HTTP with server NTLM authorization using a proxy - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -95,7 +86,7 @@ Proxy-Connection: Keep-Alive GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1235 b/tests/data/test1235 index b04958eeb..24e7f7391 100644 --- a/tests/data/test1235 +++ b/tests/data/test1235 @@ -63,25 +63,21 @@ Accept: */* </protocol> <stdout> ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0001 HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 15
the number one ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0002 HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 16
two is nice too ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0001 HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 15
the number one ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0002 HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 16
diff --git a/tests/data/test1238 b/tests/data/test1238 index cfb541c9c..5fbf640e8 100644 --- a/tests/data/test1238 +++ b/tests/data/test1238 @@ -10,7 +10,7 @@ TFTP RRQ # Server-side <reply> <servercmd> -writedelay: 2 +writedelay: 2000 </servercmd> # ~1200 bytes (so that they don't fit in two 512 byte chunks) <data nocheck="yes"> diff --git a/tests/data/test1248 b/tests/data/test1248 index 721c03e73..c289e8c0b 100644 --- a/tests/data/test1248 +++ b/tests/data/test1248 @@ -22,6 +22,9 @@ foo # Client-side <client> +<features> +proxy +</features> <server> http </server> diff --git a/tests/data/test1249 b/tests/data/test1249 index cae3e995a..554b173ef 100644 --- a/tests/data/test1249 +++ b/tests/data/test1249 @@ -22,6 +22,9 @@ foo # Client-side <client> +<features> +proxy +</features> <server> http </server> diff --git a/tests/data/test1252 b/tests/data/test1252 index 13fe3b3d9..262cf3c9b 100644 --- a/tests/data/test1252 +++ b/tests/data/test1252 @@ -23,6 +23,9 @@ foo # Client-side <client> +<features> +proxy +</features> <server> http </server> diff --git a/tests/data/test1274 b/tests/data/test1274 new file mode 100644 index 000000000..f640a69f6 --- /dev/null +++ b/tests/data/test1274 @@ -0,0 +1,75 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +header line folding +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/
+ fake
+ folded
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Content-Length: 6
+Connection:
+ close
+
+-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +HTTP header line folding + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -D log/out%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<file name="log/out%TESTNUMBER"> +HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+%if hyper +Server: test-server/ fake folded
+%else +Server: test-server/
+ fake
+ folded
+%endif +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Content-Length: 6
+%if hyper +Connection: close
+%else +Connection:
+ close
+%endif +
+</file> +</verify> +</testcase> diff --git a/tests/data/test1275 b/tests/data/test1275 new file mode 100644 index 000000000..d1cb223b8 --- /dev/null +++ b/tests/data/test1275 @@ -0,0 +1,25 @@ +<testcase> +<info> +<keywords> +documentation +markdown +</keywords> +</info> + +# +# Client-side +<client> +<server> +none +</server> + +<name> +Verify capital letters after period in markdown files +</name> + +<command type="perl"> +%SRCDIR/markdown-uppercase.pl %SRCDIR/.. +</command> +</client> + +</testcase> diff --git a/tests/data/test1293 b/tests/data/test1293 index 824886194..fb39ebcd0 100644 --- a/tests/data/test1293 +++ b/tests/data/test1293 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1308 b/tests/data/test1308 index 0c7d1b02d..3e827365c 100644 --- a/tests/data/test1308 +++ b/tests/data/test1308 @@ -16,6 +16,7 @@ none <features> unittest http +Mime </features> <name> formpost unit tests diff --git a/tests/data/test1315 b/tests/data/test1315 index 3d3faa8af..dd66df71a 100644 --- a/tests/data/test1315 +++ b/tests/data/test1315 @@ -22,6 +22,9 @@ Connection: close # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1322 b/tests/data/test1322 index ffd5048a7..ddc9aaa7f 100644 --- a/tests/data/test1322 +++ b/tests/data/test1322 @@ -46,7 +46,7 @@ HTTP with --resolve and hostname with trailing dot <verify> <protocol> GET /%TESTNUMBER HTTP/1.1
-Host: example.com:%HTTPPORT
+Host: example.com.:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test133 b/tests/data/test133 index e9fe83f7c..ad0d2def7 100644 --- a/tests/data/test133 +++ b/tests/data/test133 @@ -34,7 +34,7 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr ftp </server> <name> -FTP (compulsory .netrc; ignored user/passwd) dir list PASV +FTP compulsory .netrc; ignore passwd in URL </name> <command> -n --netrc-file log/netrc%TESTNUMBER ftp://mary:mark@%HOSTIP:%FTPPORT/ @@ -42,7 +42,7 @@ FTP (compulsory .netrc; ignored user/passwd) dir list PASV <file name="log/netrc%TESTNUMBER" > # the following two lines were created while testing curl machine %HOSTIP login user1 password passwd1 -machine %HOSTIP login user2 password passwd2 +machine %HOSTIP login mary password drfrank </file> </client> @@ -50,8 +50,8 @@ machine %HOSTIP login user2 password passwd2 # Verify data after the test has been "shot" <verify> <protocol> -USER user1
-PASS passwd1
+USER mary
+PASS drfrank
PWD
EPSV
TYPE A
diff --git a/tests/data/test1400 b/tests/data/test1400 index b4d29d379..a92b2f22e 100644 --- a/tests/data/test1400 +++ b/tests/data/test1400 @@ -82,18 +82,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1401 b/tests/data/test1401 index 65efc474c..bbd3e7b64 100644 --- a/tests/data/test1401 +++ b/tests/data/test1401 @@ -31,6 +31,11 @@ http <name> --libcurl for GET with various options </name> +<features> +http +ftp +file +</features> <setenv> SSL_CERT_FILE= </setenv> @@ -91,26 +96,24 @@ int main(int argc, char *argv[]) curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L); %endif curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); - curl_easy_setopt(hnd, CURLOPT_PROTOCOLS, (long)CURLPROTO_FILE | - (long)CURLPROTO_FTP | - (long)CURLPROTO_HTTP); + curl_easy_setopt(hnd, CURLOPT_PROTOCOLS_STR, "file,ftp,http"); /* Here is a list of options the curl code used that cannot get generated as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1402 b/tests/data/test1402 index c111af4a9..667be124c 100644 --- a/tests/data/test1402 +++ b/tests/data/test1402 @@ -87,18 +87,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1403 b/tests/data/test1403 index f86f0111c..5ecf2d28c 100644 --- a/tests/data/test1403 +++ b/tests/data/test1403 @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L); - curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?foo=bar&baz=quux"); + curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER\?foo=bar&baz=quux"); curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped"); curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); @@ -82,18 +82,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1404 b/tests/data/test1404 index 3b41c5cef..ae37c3065 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -23,6 +23,9 @@ Connection: close # Client-side <client> +<features> +Mime +</features> <server> http </server> @@ -156,18 +159,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1405 b/tests/data/test1405 index aa7cf4da1..31b7d6971 100644 --- a/tests/data/test1405 +++ b/tests/data/test1405 @@ -96,18 +96,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1406 b/tests/data/test1406 index 969df638e..0be9bfa61 100644 --- a/tests/data/test1406 +++ b/tests/data/test1406 @@ -89,18 +89,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1407 b/tests/data/test1407 index 7f48de2d1..d5bfb7f5d 100644 --- a/tests/data/test1407 +++ b/tests/data/test1407 @@ -69,18 +69,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1420 b/tests/data/test1420 index 92905faba..415e35902 100644 --- a/tests/data/test1420 +++ b/tests/data/test1420 @@ -74,18 +74,18 @@ int main(int argc, char *argv[]) as source easily. You may choose to either not use them or implement them yourself. - CURLOPT_WRITEDATA set to a objectpointer - CURLOPT_WRITEFUNCTION set to a functionpointer - CURLOPT_READDATA set to a objectpointer - CURLOPT_READFUNCTION set to a functionpointer - CURLOPT_SEEKDATA set to a objectpointer - CURLOPT_SEEKFUNCTION set to a functionpointer - CURLOPT_ERRORBUFFER set to a objectpointer - CURLOPT_STDERR set to a objectpointer - CURLOPT_DEBUGFUNCTION set to a functionpointer - CURLOPT_DEBUGDATA set to a objectpointer - CURLOPT_HEADERFUNCTION set to a functionpointer - CURLOPT_HEADERDATA set to a objectpointer + CURLOPT_WRITEDATA was set to an object pointer + CURLOPT_WRITEFUNCTION was set to a function pointer + CURLOPT_READDATA was set to an object pointer + CURLOPT_READFUNCTION was set to a function pointer + CURLOPT_SEEKDATA was set to an object pointer + CURLOPT_SEEKFUNCTION was set to a function pointer + CURLOPT_ERRORBUFFER was set to an object pointer + CURLOPT_STDERR was set to an object pointer + CURLOPT_DEBUGFUNCTION was set to a function pointer + CURLOPT_DEBUGDATA was set to an object pointer + CURLOPT_HEADERFUNCTION was set to a function pointer + CURLOPT_HEADERDATA was set to an object pointer */ diff --git a/tests/data/test1459 b/tests/data/test1459 index fde8bf1d6..e8c2b00c5 100644 --- a/tests/data/test1459 +++ b/tests/data/test1459 @@ -17,6 +17,7 @@ mkdir -p %PWD/log/test%TESTNUMBER.dir/.ssh </precheck> <features> sftp +!oldlibssh </features> <name> SFTP with corrupted known_hosts @@ -35,6 +36,7 @@ CURL_HOME=%PWD/log/test%TESTNUMBER.dir # Verify data after the test has been "shot" <verify> +# old libssh installs return the wrong thing <errorcode> 60 </errorcode> diff --git a/tests/data/test1461 b/tests/data/test1461 index 847f8d1fb..65797a405 100644 --- a/tests/data/test1461 +++ b/tests/data/test1461 @@ -33,7 +33,7 @@ curl important --help <stdout mode="text"> Usage: curl [options...] <url> -d, --data <data> HTTP POST data - -f, --fail Fail silently (no output at all) on HTTP errors + -f, --fail Fail fast with no output on HTTP errors -h, --help <category> Get help for commands -i, --include Include protocol response headers in the output -o, --output <file> Write to file instead of stdout diff --git a/tests/data/test1465 b/tests/data/test1465 Binary files differindex e8caaa2ef..1a28fb1c3 100644 --- a/tests/data/test1465 +++ b/tests/data/test1465 diff --git a/tests/data/test1467 b/tests/data/test1467 new file mode 100644 index 000000000..1be4c2c76 --- /dev/null +++ b/tests/data/test1467 @@ -0,0 +1,59 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +SOCKS5 +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<features> +proxy +unix-sockets +</features> +<server> +http +socks5unix +</server> + <name> +HTTP GET via SOCKS5 proxy via unix sockets + </name> + <command> +--socks5 localhost%SOCKSUNIXPATH http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test1468 b/tests/data/test1468 new file mode 100644 index 000000000..1ff6ada4d --- /dev/null +++ b/tests/data/test1468 @@ -0,0 +1,63 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +SOCKS5 +SOCKS5h +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<features> +proxy +unix-sockets +</features> +<server> +http +socks5unix +</server> + <name> +HTTP GET with host name using SOCKS5h via unix sockets + </name> + <command> +http://this.is.a.host.name:%HTTPPORT/%TESTNUMBER --proxy socks5h://localhost%SOCKSUNIXPATH +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: this.is.a.host.name:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<socks> +atyp 3 => this.is.a.host.name +</socks> +</verify> +</testcase> diff --git a/tests/data/test150 b/tests/data/test150 index a23b57389..fb906bf4b 100644 --- a/tests/data/test150 +++ b/tests/data/test150 @@ -4,6 +4,7 @@ HTTP HTTP GET HTTP NTLM auth +NTLM </keywords> </info> @@ -59,26 +60,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP with NTLM authorization and --fail - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm --fail </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -92,7 +83,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test1501 b/tests/data/test1501 index 9a10e0e7d..9d9263a56 100644 --- a/tests/data/test1501 +++ b/tests/data/test1501 @@ -26,8 +26,11 @@ ftp <tool> lib%TESTNUMBER </tool> +<killserver> +ftp +</killserver> <name> -FTP with multi interface and slow LIST response +FTP with multi interface and slow LIST response </name> <command> ftp://%HOSTIP:%FTPPORT/%TESTNUMBER/ diff --git a/tests/data/test1523 b/tests/data/test1523 index de31a43c9..a22b0765e 100644 --- a/tests/data/test1523 +++ b/tests/data/test1523 @@ -17,7 +17,7 @@ Funny-head: yesyes AA </data> <servercmd> -writedelay: 1 +writedelay: 1000 </servercmd> </reply> # diff --git a/tests/data/test1538 b/tests/data/test1538 index d92ec219f..ba5cf29ce 100644 --- a/tests/data/test1538 +++ b/tests/data/test1538 @@ -94,7 +94,7 @@ e58: Problem with the local SSL certificate e59: Couldn't use specified SSL cipher e60: SSL peer certificate or SSH remote key was not OK e61: Unrecognized or bad HTTP Content or Transfer-Encoding -e62: Invalid LDAP URL +e62: Unknown error e63: Maximum file size exceeded e64: Requested SSL level failed e65: Send failed since rewinding of the data stream failed @@ -107,8 +107,8 @@ e71: TFTP: Illegal operation e72: TFTP: Unknown transfer ID e73: Remote file already exists e74: TFTP: No such user -e75: Conversion failed -e76: Caller must register CURLOPT_CONV_ callback options +e75: Unknown error +e76: Unknown error e77: Problem with the SSL CA cert (path? access rights?) e78: Remote file not found e79: Error in the SSH layer @@ -131,7 +131,8 @@ e95: HTTP/3 error e96: QUIC connection error e97: proxy handshake error e98: SSL Client Certificate required -e99: Unknown error +e99: Unrecoverable error in select/poll +e100: Unknown error m-1: Please call curl_multi_perform() soon m0: No error m1: Invalid multi handle @@ -145,7 +146,8 @@ m8: API function called from within callback m9: Wakeup is unavailable or failed m10: A libcurl function was given a bad argument m11: Operation was aborted by an application callback -m12: Unknown error +m12: Unrecoverable error in select/poll +m13: Unknown error s0: No error s1: Unknown share option s2: Share currently in use @@ -158,7 +160,7 @@ u1: An invalid CURLU pointer was passed as argument u2: An invalid 'part' argument was passed as argument u3: Malformed input to a URL function u4: Port number was not a decimal number between 0 and 65535 -u5: This libcurl build doesn't support the given URL scheme +u5: Unsupported URL scheme u6: URL decode error, most likely because of rubbish in the input u7: A memory function failed u8: Credentials was passed in the URL when prohibited @@ -181,7 +183,7 @@ u24: Bad password u25: Bad path u26: Bad query u27: Bad scheme -u28: Unsupported number of slashes +u28: Unsupported number of slashes following scheme u29: Bad user u30: CURLUcode unknown </stdout> diff --git a/tests/data/test1540 b/tests/data/test1540 index 818cbb68d..2dc826555 100644 --- a/tests/data/test1540 +++ b/tests/data/test1540 @@ -34,7 +34,9 @@ Got 4 bytes but pausing! datad474 MyCoolTrailerHeader: amazingtrailer
</datacheck> - +<servercmd> +writedelay: 10 +</servercmd> </reply> # Client-side <client> diff --git a/tests/data/test1543 b/tests/data/test1543 new file mode 100644 index 000000000..be7ede209 --- /dev/null +++ b/tests/data/test1543 @@ -0,0 +1,76 @@ +<testcase> +<info> +<keywords> +HTTP +CURLOPT_CURLU +</keywords> +</info> +# +# Similar to 1518 but using CURLOPT_CURLU +# +# Server-side +<reply> +<data2 nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 17 Mar 2016 14:41:00 GMT +Server: test-server/fake +X-Special: swsclose +Content-Length: 0 +Connection: close + +</data2> +<data nocheck="yes"> +HTTP/1.1 302 redirect +Date: Thu, 17 Mar 2016 14:41:00 GMT +Server: test-server/fake +Content-Type: text/plain; charset=US-ASCII +Location: ../%TESTNUMBER0002 +Content-Length: 0 +Connection: close + +</data> +</reply> + +# Client-side +<client> +<server> +http +</server> +# tool is what to use instead of 'curl' +<tool> +lib%TESTNUMBER +</tool> + +<name> +CURLOPT_CURLU, URL with space and CURLINFO_EFFECTIVE_URL +</name> +<command> +"http://%HOSTIP:%HTTPPORT/ /with/ space/ /file" +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%20/with/%20space/%20/file HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /%20/with/%20space/%TESTNUMBER0002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol> +<stdout> +res 0 +status 200 +redirects 1 +effectiveurl http://%HOSTIP:%HTTPPORT/%20/with/%20space/%TESTNUMBER0002 +redirecturl blank +</stdout> +<errorcode> +0 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test155 b/tests/data/test155 index 8eabab653..2d916c975 100644 --- a/tests/data/test155 +++ b/tests/data/test155 @@ -4,6 +4,7 @@ HTTP HTTP PUT HTTP NTLM auth +NTLM </keywords> </info> @@ -78,26 +79,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP PUT with --anyauth authorization (picking NTLM) - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth </command> -<precheck> -chkhostname curlhost -</precheck> <file name="log/put%TESTNUMBER"> This is data we upload with PUT a second line @@ -125,7 +116,7 @@ Content-Length: 0 PUT /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 85
diff --git a/tests/data/test1553 b/tests/data/test1553 index bc8303211..595eb5ba5 100644 --- a/tests/data/test1553 +++ b/tests/data/test1553 @@ -28,6 +28,9 @@ body # # Client-side <client> +<features> +Mime +</features> <server> imap </server> diff --git a/tests/data/test1561 b/tests/data/test1561 index fbfea08c6..882b25780 100644 --- a/tests/data/test1561 +++ b/tests/data/test1561 @@ -35,12 +35,12 @@ nomnom HTTP/1.1 200 OK Date: Tue, 09 Nov 2010 14:49:00 GMT Server: test-server/fake -Set-Cookie: super=secret; domain=example.com; path=/%TESTNUMBER; httponly; -Set-Cookie: super=secret; domain=example.com; path=/%TESTNUMBER/; httponly; -Set-Cookie: super=secret; domain=example.com; path=/15; httponly; +Set-Cookie: super=plain; domain=example.com; path=/%TESTNUMBER; httponly; +Set-Cookie: super=plain; domain=example.com; path=/%TESTNUMBER/; httponly; +Set-Cookie: super=plain; domain=example.com; path=/15; httponly; Set-Cookie: public=yes; domain=example.com; path=/foo; -Set-Cookie: supersuper=secret; domain=example.com; path=/%TESTNUMBER/login/en; -Set-Cookie: supersuper=secret; domain=example.com; path=/%TESTNUMBER/login; +Set-Cookie: supersuper=plain; domain=example.com; path=/%TESTNUMBER/login/en; +Set-Cookie: supersuper=plain; domain=example.com; path=/%TESTNUMBER/login; Set-Cookie: secureoverhttp=yes; domain=example.com; path=/%TESTNUMBER; secure; Set-Cookie: __Secure-SID=22345; Domain=example.com Set-Cookie: __Secure-SID=22346; Secure; Domain=example.com @@ -94,11 +94,12 @@ Accept: */* # This file was generated by libcurl! Edit at your own risk. .example.com TRUE /foo FALSE 0 public yes +#HttpOnly_.example.com TRUE /15 FALSE 0 super plain 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 /%TESTNUMBER/login/ TRUE 0 supersuper secret -#HttpOnly_.example.com TRUE /15 FALSE 0 super secret +.example.com TRUE /1561 TRUE 0 super secret </file> </verify> diff --git a/tests/data/test158 b/tests/data/test158 index 2fbaf65c0..23861365e 100644 --- a/tests/data/test158 +++ b/tests/data/test158 @@ -17,6 +17,9 @@ Silly-header: yeeeees # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1590 b/tests/data/test1590 index bfaa7545c..dbb81cc29 100644 --- a/tests/data/test1590 +++ b/tests/data/test1590 @@ -28,6 +28,9 @@ body # # Client-side <client> +<features> +Mime +</features> <server> imap </server> diff --git a/tests/data/test1597 b/tests/data/test1597 new file mode 100644 index 000000000..047bf7bd8 --- /dev/null +++ b/tests/data/test1597 @@ -0,0 +1,32 @@ +<testcase> +<info> +<keywords> +CURLOPT_PROTOCOLS_STR +</keywords> +</info> + +# Server-side +<reply> +</reply> +# Client-side +<client> +<server> +none +</server> +<name> +CURLOPT_PROTOCOLS_STR +</name> +<tool> +lib%TESTNUMBER +</tool> +<command> +- +</command> +</client> + +<verify> +<stdout> +Tested 15 strings +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1614 b/tests/data/test1614 new file mode 100644 index 000000000..4a9d54eb6 --- /dev/null +++ b/tests/data/test1614 @@ -0,0 +1,25 @@ +<testcase> +<info> +<keywords> +unittest +</keywords> +</info> + +# +# Client-side +<client> +<server> +none +</server> +<features> +unittest +proxy +</features> + <name> +cidr comparisons + </name> +</client> +<errorcode> +0 +</errorcode> +</testcase> diff --git a/tests/data/test163 b/tests/data/test163 index 344f1042d..b763c3ca8 100644 --- a/tests/data/test163 +++ b/tests/data/test163 @@ -20,6 +20,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1635 b/tests/data/test1635 new file mode 100644 index 000000000..399846c00 --- /dev/null +++ b/tests/data/test1635 @@ -0,0 +1,64 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +RETRY-AFTER +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 429 too many requests swsbounce +Retry-After: 1 +Content-Length: 4 + +moo +</data> +<data1 nocheck="yes"> +HTTP/1.1 200 OK +Content-Length: 4 +Connection: close + +hey +</data1> + +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<name> +--retry with a 429 response and Retry-After: and --fail-with-body +</name> +<command option="no-include"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail-with-body +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<stdout> +moo +hey +</stdout> +</verify> +</testcase> diff --git a/tests/data/test166 b/tests/data/test166 index 3ee1d69b6..bcbf37755 100644 --- a/tests/data/test166 +++ b/tests/data/test166 @@ -20,6 +20,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1670 b/tests/data/test1670 new file mode 100644 index 000000000..6d8722f61 --- /dev/null +++ b/tests/data/test1670 @@ -0,0 +1,61 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +-w +%header +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<features> +headers-api +</features> +<server> +http +</server> +<name> +-w individual header output +</name> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w '%header{etag} %header{nope} %header{DATE}\n' -o log/%TESTNUMBER.out +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<stdout mode="text"> +"21025-dc7-39462498" Tue, 09 Nov 2010 14:49:00 GMT +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1671 b/tests/data/test1671 new file mode 100644 index 000000000..e45ea784d --- /dev/null +++ b/tests/data/test1671 @@ -0,0 +1,72 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +-w +%header +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Tue, 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 +Set-Cookie: firstcookie=want1; path=/ +Funny-head: yesyes +Set-Cookie: 2cookie=want2; path=/ +Content-Type: text/html +Set-Cookie: cookie3=want3; path=/ +Content-Length: 6 +Connection: close + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<features> +headers-api +</features> +<server> +http +</server> +<name> +-w header JSON output +</name> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w '%{header_json}\n' -o log/%TESTNUMBER.out +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<stdout mode="text"> +{"date":["Tue, 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"], +"set-cookie":["firstcookie=want1; path=/","2cookie=want2; path=/","cookie3=want3; path=/"], +"content-length":["6"], +"connection":["close"] +} +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1680 b/tests/data/test1680 new file mode 100644 index 000000000..7d8167c0e --- /dev/null +++ b/tests/data/test1680 @@ -0,0 +1,55 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +--clobber +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</data> +</reply> + +# +# Client-side +<client> +<name> +HTTP GET with explicit clobber +</name> +<server> +http +</server> +<features> +http +</features> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/exist%TESTNUMBER --clobber +</command> +<file name="log/exist%TESTNUMBER"> +to be overwritten +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<file name="log/exist%TESTNUMBER"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</file> +</verify> +</testcase> diff --git a/tests/data/test1681 b/tests/data/test1681 new file mode 100644 index 000000000..cfc8a5db8 --- /dev/null +++ b/tests/data/test1681 @@ -0,0 +1,61 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +--no-clobber +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</data> +</reply> + +# +# Client-side +<client> +<name> +HTTP GET without clobber +</name> +<server> +http +</server> +<features> +http +</features> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/exist%TESTNUMBER --no-clobber -w '%{filename_effective}\n' +</command> +<file name="log/exist%TESTNUMBER"> +to stay the same +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<file name="log/exist%TESTNUMBER"> +to stay the same +</file> +<file1 name="log/exist%TESTNUMBER.1"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</file1> +<stdout mode="text"> +log/exist%TESTNUMBER.1 +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1682 b/tests/data/test1682 new file mode 100644 index 000000000..e981c20e9 --- /dev/null +++ b/tests/data/test1682 @@ -0,0 +1,58 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +--no-clobber +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</data> +</reply> + +# +# Client-side +<client> +<name> +HTTP GET without clobber and --output-dir +</name> +<server> +http +</server> +<features> +http +</features> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --output-dir log -o exist%TESTNUMBER --no-clobber +</command> +<file name="log/exist%TESTNUMBER"> +to stay the same +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<file name="log/exist%TESTNUMBER"> +to stay the same +</file> +<file1 name="log/exist%TESTNUMBER.1"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</file1> +</verify> +</testcase> diff --git a/tests/data/test1683 b/tests/data/test1683 new file mode 100644 index 000000000..93d27d73c --- /dev/null +++ b/tests/data/test1683 @@ -0,0 +1,61 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +--no-clobber +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.0 200 OK +Connection: close +Content-Type: text/plain +Content-Length: 4 + +foo +</data> +</reply> + +# +# Client-side +<client> +<name> +HTTP GET without clobber when 100 files already exist +</name> +<server> +http +</server> +<features> +http +</features> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/exist%TESTNUMBER --no-clobber +</command> +<file name="log/exist%TESTNUMBER"> +to stay the same +</file> +<precheck> +perl -e 'for my $i ((1..100)) { my $filename = "log/exist%TESTNUMBER.$i"; open(FH, ">", $filename) or die $!; print FH "to stay the same" ; close(FH) }' +# python3 -c 'for i in range(1, 101): open("log/exist%TESTNUMBER.{}".format(i), mode="w").write("to stay the same")' +</precheck> +<postcheck> +perl -e 'for my $i ((1..100)) { my $filename = "log/exist%TESTNUMBER.$i"; open(FH, "<", $filename) or die $!; (<FH> eq "to stay the same" and <FH> eq "") or die "incorrect $filename" ; close(FH) }' +# python3 -c 'for i in range(1, 101): assert open("log/exist%TESTNUMBER.{}".format(i), mode="r").read(17) == "to stay the same"' +</postcheck> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<errorcode> +23 +</errorcode> +<file name="log/exist%TESTNUMBER"> +to stay the same +</file> +</verify> +</testcase> diff --git a/tests/data/test169 b/tests/data/test169 index a5e5ba539..3a86cdf51 100644 --- a/tests/data/test169 +++ b/tests/data/test169 @@ -6,6 +6,7 @@ HTTP GET HTTP proxy HTTP proxy NTLM auth HTTP Digest auth +NTLM </keywords> </info> @@ -79,24 +80,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP with proxy-requiring-NTLM to site-requiring-Digest - </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> +</name> +<command> http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -111,7 +102,7 @@ Proxy-Connection: Keep-Alive GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
Host: data.from.server.requiring.digest.hohoho.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test170 b/tests/data/test170 index 28874a92e..22767cb5a 100644 --- a/tests/data/test170 +++ b/tests/data/test170 @@ -18,6 +18,7 @@ HTTP proxy NTLM auth http </server> <features> +Mime NTLM SSL !SSPI diff --git a/tests/data/test1700 b/tests/data/test1700 index 9cf873928..7f78bcf5f 100644 --- a/tests/data/test1700 +++ b/tests/data/test1700 @@ -11,26 +11,26 @@ HTTP/2 # Server-side <reply> <data nocheck="yes"> -HTTP/1.1 200 OK -Date: Tue, 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 - +HTTP/1.1 200 OK
+Date: Tue, 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> <data1> -HTTP/1.1 200 OK -Date: Tue, 09 Nov 2010 14:49:00 GMT -Content-Length: 6 -Connection: close -Content-Type: text/html - +HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
-maa- </data1> </reply> @@ -38,6 +38,9 @@ Content-Type: text/html # # Client-side <client> +<features> +h2c +</features> <server> http http/2 diff --git a/tests/data/test1701 b/tests/data/test1701 index c4687d911..22f6147d0 100644 --- a/tests/data/test1701 +++ b/tests/data/test1701 @@ -11,17 +11,17 @@ HTTP/2 # Server-side <reply> <data nocheck="yes"> -HTTP/1.1 200 OK -Date: Tue, 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 - +HTTP/1.1 200 OK
+Date: Tue, 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> @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +h2c +</features> <server> http http/2 diff --git a/tests/data/test1702 b/tests/data/test1702 index b679c7bca..1da9bc6b5 100644 --- a/tests/data/test1702 +++ b/tests/data/test1702 @@ -28,6 +28,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +h2c +</features> <server> http http/2 diff --git a/tests/data/test173 b/tests/data/test173 index 096861623..a3356c976 100644 --- a/tests/data/test173 +++ b/tests/data/test173 @@ -21,6 +21,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test174 b/tests/data/test174 index d8090c5d5..b0b7c5f7a 100644 --- a/tests/data/test174 +++ b/tests/data/test174 @@ -21,7 +21,7 @@ This is not the real page # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test175 b/tests/data/test175 index 538543448..382e1a70b 100644 --- a/tests/data/test175 +++ b/tests/data/test175 @@ -45,7 +45,7 @@ content for you # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test177 b/tests/data/test177 index c190f0523..6ee5fd06e 100644 --- a/tests/data/test177 +++ b/tests/data/test177 @@ -21,7 +21,7 @@ Content-Type: text/html; charset=iso-8859-1 # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test18 b/tests/data/test18 index 11b953ea6..888745889 100644 --- a/tests/data/test18 +++ b/tests/data/test18 @@ -65,19 +65,16 @@ Accept: */* </protocol> <stdout> ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 4
moo ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0002 HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 4
foo ---_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0003 HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 4
diff --git a/tests/data/test1800 b/tests/data/test1800 index 85e247c3c..d7cc73af4 100644 --- a/tests/data/test1800 +++ b/tests/data/test1800 @@ -23,6 +23,9 @@ Content-Type: text/html # Client-side <client> +<features> +h2c +</features> <server> http </server> diff --git a/tests/data/test186 b/tests/data/test186 index 35232b82c..0f0c91cc8 100644 --- a/tests/data/test186 +++ b/tests/data/test186 @@ -21,6 +21,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test1919 b/tests/data/test1919 new file mode 100644 index 000000000..98613877b --- /dev/null +++ b/tests/data/test1919 @@ -0,0 +1,51 @@ +<testcase> +<info> +<keywords> +conn-reuse +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Content-Length: 6 + +-foo- +</data> +</reply> + +# Client-side +<client> +<server> +http +</server> + +# This created a memory leak in 7.83.1 and earlier +<name> +set CURLOPT_XOAUTH2_BEARER and do connection reuse +</name> +<tool> +lib%TESTNUMBER +</tool> +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Bearer c4e448d652a961fda0ab64f882c8c161d5985f805d45d80c9ddca1
+Accept: */*
+
+GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Bearer c4e448d652a961fda0ab64f882c8c161d5985f805d45d80c9ddca1
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test1933 b/tests/data/test1933 index d2aabb1fe..3f3e8ac2c 100644 --- a/tests/data/test1933 +++ b/tests/data/test1933 @@ -47,7 +47,7 @@ lib%TESTNUMBER </tool> <command> -http://xxx:yyy@%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test +http://xxx:yyy@127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT </command> </client> @@ -60,8 +60,8 @@ http://xxx:yyy@%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test </strip> <protocol> GET /%TESTNUMBER/testapi/test HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
-Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;x-xxx-date, Signature=d2c2dff48c59ec49dc31ef94f18c5dc1ac3eae2a70d51633a4342dadc0683664
+Host: 127.0.0.1:9000
+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;x-xxx-date, Signature=3d8e00a02e437211a596143dcd590fcc805b731365c68f7f48951ea6eda39c4f
X-Xxx-Date: 19700101T000000Z
</protocol> diff --git a/tests/data/test1934 b/tests/data/test1934 index 35fa318c1..a131df49e 100644 --- a/tests/data/test1934 +++ b/tests/data/test1934 @@ -47,7 +47,7 @@ lib%TESTNUMBER </tool> <command> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test +http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT </command> </client> @@ -60,8 +60,8 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test </strip> <protocol> GET /%TESTNUMBER/testapi/test HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
-Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=938937ca7da6bb3dbf15e30928265ec6f061532d035d2afda92fa7cb10feb196
+Host: 127.0.0.1:9000
+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=cf8dc9a4af903a1a9bb1385d8e2366d780afb501e266436598438395e502d58c
X-Yyy-Date: 19700101T000000Z
</protocol> diff --git a/tests/data/test1935 b/tests/data/test1935 index 6d48f325c..d39a86471 100644 --- a/tests/data/test1935 +++ b/tests/data/test1935 @@ -47,7 +47,7 @@ lib%TESTNUMBER </tool> <command> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test +http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT </command> </client> @@ -60,8 +60,8 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test </strip> <protocol> GET /%TESTNUMBER/testapi/test HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
-Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/rrr/127/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=240750deb9263d4c8ece71c016f3919b56e518249390ef075740f94ef8df846f
+Host: 127.0.0.1:9000
+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/rrr/127/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=a0b11b97b54689428d4188b788ed32865d607822d85d3e91cf06141f479dac0b
X-Yyy-Date: 19700101T000000Z
</protocol> diff --git a/tests/data/test1936 b/tests/data/test1936 index 366abd64b..a0d38403b 100644 --- a/tests/data/test1936 +++ b/tests/data/test1936 @@ -47,7 +47,7 @@ lib%TESTNUMBER </tool> <command> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test +http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT </command> </client> @@ -60,8 +60,8 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test </strip> <protocol> GET /%TESTNUMBER/testapi/test HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
-Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/rrr/sss/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=f32cf87977cea5d3274b524b53e5d28f4aac54c372f710ae0cc3a9ececaf169f
+Host: 127.0.0.1:9000
+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/rrr/sss/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=026b713d76b0789bd224c5e41322f74eed088f8a22fd15183ca68376c575c5b0
X-Yyy-Date: 19700101T000000Z
</protocol> diff --git a/tests/data/test1937 b/tests/data/test1937 index e24445ac6..ca1214b83 100644 --- a/tests/data/test1937 +++ b/tests/data/test1937 @@ -48,7 +48,7 @@ lib%TESTNUMBER </tool> <command> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test +http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT </command> </client> @@ -61,8 +61,8 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test </strip> <protocol nonewline="yes"> POST /%TESTNUMBER/testapi/test HTTP/1.1
-Host: %HOSTIP:%HTTPPORT
-Authorization: PROVIDER14-HMAC-SHA256 Credential=keyId/19700101/region/service/provider14_request, SignedHeaders=content-type;host;x-provider2-date, Signature=391e410177d0e9ee80728082446ef69d6b29157fe71f8b4805fce7c186fd956d
+Host: 127.0.0.1:9000
+Authorization: PROVIDER14-HMAC-SHA256 Credential=keyId/19700101/region/service/provider14_request, SignedHeaders=content-type;host;x-provider2-date, Signature=4928ccf97a9e71fe27f91db5a3b3c943b6080d25e6f4df8593d4c38e7d1e849b
X-Provider2-Date: 19700101T000000Z
Content-Length: 8
diff --git a/tests/data/test1938 b/tests/data/test1938 Binary files differindex 5341de00f..565a54ffe 100644 --- a/tests/data/test1938 +++ b/tests/data/test1938 diff --git a/tests/data/test1940 b/tests/data/test1940 new file mode 100644 index 000000000..7f621b428 --- /dev/null +++ b/tests/data/test1940 @@ -0,0 +1,62 @@ +<testcase> +<info> +<keywords> +curl_easy_header +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Fold: is + folding a + line +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +</reply> + +# Client-side +<client> +<features> +headers-api +</features> +<server> +http +</server> + +<name> +curl_easy_header +</name> +<tool> +lib%TESTNUMBER +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<stdout> + Date == Thu, 09 Nov 2010 14:49:00 GMT + Server == test with trailing space + Content-Type == text/html + Content-Length == 0 + Location == /%TESTNUMBER0002 +- Set-Cookie == onecookie=data; (0/3) +- Set-Cookie == secondcookie=2data; (1/3) +- Set-Cookie == cookie3=data3; (2/3) + Fold == is folding a line +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1941 b/tests/data/test1941 new file mode 100644 index 000000000..fe3f1de39 --- /dev/null +++ b/tests/data/test1941 @@ -0,0 +1,76 @@ +<testcase> +<info> +<keywords> +curl_easy_header +CONNECT +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +<connect> +HTTP/1.1 200 Sure go ahead
+Server: from the connect
+Silly-thing: yes yes
+
+</connect> +</reply> + +# Client-side +<client> +<features> +proxy +SSL +headers-api +</features> +<server> +http +http-proxy +</server> + +<name> +curl_easy_header with CONNECT +</name> +<tool> +lib1940 +</tool> + +<command> +http://hello:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<proxy> +CONNECT hello:%HTTPPORT HTTP/1.1
+Host: hello:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+</proxy> +<stdout> + Date == Thu, 09 Nov 2010 14:49:00 GMT + Server == test with trailing space + Content-Type == text/html + Content-Length == 0 + Location == /%TESTNUMBER0002 +- Set-Cookie == onecookie=data; (0/3) +- Set-Cookie == secondcookie=2data; (1/3) +- Set-Cookie == cookie3=data3; (2/3) + Server == from the connect + Silly-thing == yes yes +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1942 b/tests/data/test1942 new file mode 100644 index 000000000..907980099 --- /dev/null +++ b/tests/data/test1942 @@ -0,0 +1,66 @@ +<testcase> +<info> +<keywords> +curl_easy_header +CONNECT +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 100 continue +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: maybe different + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +</reply> + +# Client-side +<client> +<features> +http +headers-api +</features> +<server> +http +</server> + +<name> +curl_easy_header with 1xx response +</name> +<tool> +lib1940 +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<stdout> + Date == Thu, 09 Nov 2010 14:49:00 GMT + Server == test with trailing space + Content-Type == text/html + Content-Length == 0 + Location == /%TESTNUMBER0002 +- Set-Cookie == onecookie=data; (0/3) +- Set-Cookie == secondcookie=2data; (1/3) +- Set-Cookie == cookie3=data3; (2/3) + Date == Thu, 09 Nov 2010 14:49:00 GMT + Server == maybe different +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1943 b/tests/data/test1943 new file mode 100644 index 000000000..194ff111b --- /dev/null +++ b/tests/data/test1943 @@ -0,0 +1,62 @@ +<testcase> +<info> +<keywords> +curl_easy_header +CONNECT +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 funky chunky!
+Server: fakeit/0.9 fakeitbad/1.0
+Date: Thu, 09 Nov 2010 14:49:00 GMT +Transfer-Encoding: chunked
+Trailer: server
+Connection: mooo
+
+40
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+30
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+21;heresatest=moooo
+cccccccccccccccccccccccccccccccc +
+0
+Server: sent-as-trailer
+
+</data> +</reply> + +# Client-side +<client> +<features> +http +headers-api +</features> +<server> +http +</server> + +<name> +curl_easy_header with trailers +</name> +<tool> +lib1940 +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<stdout> + Date == Thu, 09 Nov 2010 14:49:00 GMT + Server == fakeit/0.9 fakeitbad/1.0 + Server == sent-as-trailer +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1944 b/tests/data/test1944 new file mode 100644 index 000000000..ad0920d4a --- /dev/null +++ b/tests/data/test1944 @@ -0,0 +1,66 @@ +<testcase> +<info> +<keywords> +curl_easy_header +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 302 OK +Date: Thu, 01 Nov 2001 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +<data2 nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: the other one +Content-Type: text/html +Content-Length: 0 +Set-Cookie: 1cookie=data1; +Set-Cookie: 2cookie=data2; + +</data2> +</reply> + +# Client-side +<client> +<features> +headers-api +</features> +<server> +http +</server> + +<name> +curl_easy_header with redirect +</name> +<tool> +lib1940 +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<stdout> + Date == Thu, 09 Nov 2010 14:49:00 GMT + Server == the other one + Content-Type == text/html + Content-Length == 0 +- Set-Cookie == 1cookie=data1; (0/2) +- Set-Cookie == 2cookie=data2; (1/2) +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1945 b/tests/data/test1945 new file mode 100644 index 000000000..86fa147ad --- /dev/null +++ b/tests/data/test1945 @@ -0,0 +1,76 @@ +<testcase> +<info> +<keywords> +curl_easy_header +CONNECT +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +<connect> +HTTP/1.1 200 Sure go ahead
+Server: from the connect
+Silly-thing: yes yes
+
+</connect> +</reply> + +# Client-side +<client> +<features> +proxy +SSL +headers-api +</features> +<server> +http +http-proxy +</server> + +<name> +curl_easy_nextheader with server + CONNECT +</name> +<tool> +lib%TESTNUMBER +</tool> + +<command> +http://hello:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<proxy> +CONNECT hello:%HTTPPORT HTTP/1.1
+Host: hello:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+</proxy> +<stdout> + Server == from the connect (0/2) + Silly-thing == yes yes (0/1) + Date == Thu, 09 Nov 2010 14:49:00 GMT (0/1) + Server == test with trailing space (1/2) + Content-Type == text/html (0/1) + Content-Length == 0 (0/1) + Set-Cookie == onecookie=data; (0/3) + Set-Cookie == secondcookie=2data; (1/3) + Set-Cookie == cookie3=data3; (2/3) + Location == /19450002 (0/1) +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1946 b/tests/data/test1946 new file mode 100644 index 000000000..220df012b --- /dev/null +++ b/tests/data/test1946 @@ -0,0 +1,68 @@ +<testcase> +<info> +<keywords> +curl_easy_header +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 302 OK +Date: Thu, 01 Nov 2001 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +<data2 nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: the other one +Content-Type: text/html +Content-Length: 0 +Set-Cookie: 1cookie=data1; +Set-Cookie: 2cookie=data2; + +</data2> +</reply> + +# Client-side +<client> +<features> +headers-api +</features> +<server> +http +</server> + +<name> +curl_easy_header with redirect but get headers from first request +</name> +<tool> +lib%TESTNUMBER +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<stdout> + Date == Thu, 01 Nov 2001 14:49:00 GMT + Server == test with trailing space + Content-Type == text/html + Content-Length == 0 + Location == /19460002 +- Set-Cookie == onecookie=data; (0/3) +- Set-Cookie == secondcookie=2data; (1/3) +- Set-Cookie == cookie3=data3; (2/3) +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1947 b/tests/data/test1947 new file mode 100644 index 000000000..f159e4d51 --- /dev/null +++ b/tests/data/test1947 @@ -0,0 +1,71 @@ +<testcase> +<info> +<keywords> +curl_easy_nextheader +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 302 OK +Date: Thu, 01 Nov 2001 14:49:00 GMT +Server: test with trailing space +Content-Type: text/html +Content-Length: 0 +Set-Cookie: onecookie=data; +Set-Cookie: secondcookie=2data; +Set-Cookie: cookie3=data3; +Location: /%TESTNUMBER0002 + +</data> +<data2 nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: the other one +Content-Type: text/html +Content-Length: 0 +Set-Cookie: 1cookie=data1; +Set-Cookie: 2cookie=data2; + +</data2> + +<data3 nocheck="yes"> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: the other one +Content-Type: text/html +Content-Length: 0 + +</data3> +</reply> + +# Client-side +<client> +<features> +headers-api +</features> +<server> +http +</server> + +<name> +curl_easy_nextheader on second request after first did redirects +</name> +<tool> +lib%TESTNUMBER +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003 +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<stdout> +count = 2 +count = 1 +</stdout> +</verify> +</testcase> diff --git a/tests/data/test1948 b/tests/data/test1948 new file mode 100644 index 000000000..639523d99 --- /dev/null +++ b/tests/data/test1948 @@ -0,0 +1,73 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP POST +HTTP PUT +</keywords> +</info> + +# Server-side +<reply> +<data> +HTTP/1.1 200 OK
+Date: Thu, 01 Nov 2001 14:49:00 GMT
+Content-Type: text/html
+Content-Length: 6
+
+hello +</data> +<datacheck> +HTTP/1.1 200 OK
+Date: Thu, 01 Nov 2001 14:49:00 GMT
+Content-Type: text/html
+Content-Length: 6
+
+hello +HTTP/1.1 200 OK
+Date: Thu, 01 Nov 2001 14:49:00 GMT
+Content-Type: text/html
+Content-Length: 6
+
+hello +</datacheck> +</reply> + +# Client-side +<client> +<server> +http +</server> + +<name> +CURLOPT_POST after CURLOPT_UPLOAD reusing handle +</name> +<tool> +lib%TESTNUMBER +</tool> + +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<protocol> +PUT /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 22
+Expect: 100-continue
+
+This is test PUT data +POST /1948 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 22
+Content-Type: application/x-www-form-urlencoded
+
+This is test PUT data +</protocol> +</verify> +</testcase> diff --git a/tests/data/test1955 b/tests/data/test1955 new file mode 100644 index 000000000..5ebbc54bc --- /dev/null +++ b/tests/data/test1955 @@ -0,0 +1,75 @@ +<testcase> +<info> +<keywords> +HTTP +CURLOPT_AWS_SIGV4 +</keywords> +</info> + +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 302 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Content-Length: 0 +Location: /%TESTNUMBER0002 + +</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 + +</data2> +</reply> + +# Client-side +<client> +<server> +http +</server> +# this relies on the debug feature which allow to set the time +<features> +SSL +debug +crypto +</features> +<setenv> +CURL_FORCEHOST=1 +</setenv> + +<name> +HTTP AWS_SIGV4 with X-Xxx-Content-Sha256 +</name> +<tool> +lib%TESTNUMBER +</tool> + +<command> +http://exam.ple.com:9000/%TESTNUMBER/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPPORT +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +^Content-Type:.* +^Accept:.* +</strip> +<protocol> +GET /%TESTNUMBER/testapi/test HTTP/1.1
+Host: exam.ple.com:9000
+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/ple/exam/xxx4_request, SignedHeaders=content-type;host;tesmixcase;test0;test1;test2;test_space;x-xxx-date, Signature=819251feec8de52dfaa992320241f23d27cefa979c93e039ae7df03ac486ed16
+X-Xxx-Date: 19700101T000000Z
+test2: 1234
+test_space: t s m end
+tesMixCase: MixCase
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test2025 b/tests/data/test2025 index 5ab8b8582..4794d3c0e 100644 --- a/tests/data/test2025 +++ b/tests/data/test2025 @@ -5,6 +5,7 @@ HTTP HTTP GET HTTP Basic auth HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -205,21 +206,12 @@ http libauthretry </tool> - <name> +<name> HTTP authorization retry (Basic switching to NTLM) - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER basic ntlm </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -237,7 +229,7 @@ Accept: */* GET /%TESTNUMBER0200 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0300 HTTP/1.1
@@ -252,7 +244,7 @@ Accept: */* GET /%TESTNUMBER0400 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0500 HTTP/1.1
@@ -262,7 +254,7 @@ Accept: */* GET /%TESTNUMBER0500 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
</protocol> diff --git a/tests/data/test2028 b/tests/data/test2028 index 889561252..0ad03db58 100644 --- a/tests/data/test2028 +++ b/tests/data/test2028 @@ -5,6 +5,7 @@ HTTP HTTP GET HTTP Digest auth HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -241,21 +242,12 @@ http libauthretry </tool> - <name> +<name> HTTP authorization retry (Digest switching to NTLM) - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER digest ntlm </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -277,7 +269,7 @@ Accept: */* GET /%TESTNUMBER0200 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0300 HTTP/1.1
@@ -296,7 +288,7 @@ Accept: */* GET /%TESTNUMBER0400 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0500 HTTP/1.1
@@ -306,7 +298,7 @@ Accept: */* GET /%TESTNUMBER0500 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
</protocol> diff --git a/tests/data/test2029 b/tests/data/test2029 index 53b433e83..616fec179 100644 --- a/tests/data/test2029 +++ b/tests/data/test2029 @@ -5,6 +5,7 @@ HTTP HTTP GET HTTP Basic auth HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -178,21 +179,12 @@ http libauthretry </tool> - <name> +<name> HTTP authorization retry (NTLM switching to Basic) - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm basic </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -205,7 +197,7 @@ Accept: */* GET /%TESTNUMBER0100 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0200 HTTP/1.1
@@ -220,7 +212,7 @@ Accept: */* GET /%TESTNUMBER0300 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0400 HTTP/1.1
diff --git a/tests/data/test2030 b/tests/data/test2030 index dc3dfe855..8931ca749 100644 --- a/tests/data/test2030 +++ b/tests/data/test2030 @@ -5,6 +5,7 @@ HTTP HTTP GET HTTP Digest auth HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -230,21 +231,12 @@ http libauthretry </tool> - <name> +<name> HTTP authorization retry (NTLM switching to Digest) - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm digest </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -257,7 +249,7 @@ Accept: */* GET /%TESTNUMBER0100 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0200 HTTP/1.1
@@ -272,7 +264,7 @@ Accept: */* GET /%TESTNUMBER0300 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0400 HTTP/1.1
diff --git a/tests/data/test2031 b/tests/data/test2031 index 6a8399546..20dd87413 100644 --- a/tests/data/test2031 +++ b/tests/data/test2031 @@ -4,6 +4,7 @@ HTTP HTTP GET HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -244,21 +245,12 @@ http libauthretry </tool> - <name> +<name> HTTP authorization retry (NTLM) - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm ntlm </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -271,7 +263,7 @@ Accept: */* GET /%TESTNUMBER0100 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0200 HTTP/1.1
@@ -281,7 +273,7 @@ Accept: */* GET /%TESTNUMBER0200 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0300 HTTP/1.1
@@ -291,7 +283,7 @@ Accept: */* GET /%TESTNUMBER0300 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0400 HTTP/1.1
@@ -301,7 +293,7 @@ Accept: */* GET /%TESTNUMBER0400 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
GET /%TESTNUMBER0500 HTTP/1.1
@@ -311,7 +303,7 @@ Accept: */* GET /%TESTNUMBER0500 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
</protocol> diff --git a/tests/data/test2032 b/tests/data/test2032 index 08ac71515..72c7cc4d2 100644 --- a/tests/data/test2032 +++ b/tests/data/test2032 @@ -6,6 +6,7 @@ HTTP GET HTTP Basic auth HTTP NTLM auth flaky +NTLM </keywords> </info> # Server-side @@ -76,21 +77,12 @@ http libntlmconnect </tool> - <name> +<name> NTLM connection mapping - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -113,7 +105,7 @@ Accept: */* GET /%TESTNUMBER0200 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
</protocol> diff --git a/tests/data/test2058 b/tests/data/test2058 index daff038d7..c400f2630 100644 --- a/tests/data/test2058 +++ b/tests/data/test2058 @@ -59,7 +59,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test2059 b/tests/data/test2059 index 0bf160c7d..3170c99a1 100644 --- a/tests/data/test2059 +++ b/tests/data/test2059 @@ -59,7 +59,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test2060 b/tests/data/test2060 index e0b4505ef..11dd15526 100644 --- a/tests/data/test2060 +++ b/tests/data/test2060 @@ -59,7 +59,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test2073 b/tests/data/test2073 index dd3641546..c6b3dee5a 100644 --- a/tests/data/test2073 +++ b/tests/data/test2073 @@ -27,6 +27,9 @@ contents2 # # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test2081 b/tests/data/test2081 index a6733e737..add929252 100644 --- a/tests/data/test2081 +++ b/tests/data/test2081 @@ -19,6 +19,12 @@ Connection: close This server reply is for testing a simple Location: following </data> +<data2> +HTTP/1.1 200 This is another weirdo text message swsclose
+Connection: close
+
+Thanks for following. +</data2> </reply> # Client-side @@ -36,9 +42,6 @@ http://user:pass@%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER#anchor --location --r # Verify data after the test has been "shot" <verify> -<errorcode> -52 -</errorcode> <protocol> GET /we/want/our/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
@@ -60,6 +63,10 @@ Location: data/%TESTNUMBER0002.txt?coolsite=yes Content-Length: 62
Connection: close
+HTTP/1.1 200 This is another weirdo text message swsclose
+Connection: close
+
+Thanks for following. http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER </stdout> </verify> diff --git a/tests/data/test209 b/tests/data/test209 index 59a293d66..887d04fbe 100644 --- a/tests/data/test209 +++ b/tests/data/test209 @@ -6,6 +6,7 @@ HTTP GET HTTP CONNECT HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> @@ -79,24 +80,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy CONNECT auth NTLM - </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> +</name> +<command> http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -110,7 +101,7 @@ Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test21 b/tests/data/test21 index 8e4e847e0..5c099cf34 100644 --- a/tests/data/test21 +++ b/tests/data/test21 @@ -13,6 +13,9 @@ multiple HTTP requests # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test213 b/tests/data/test213 index b9ddc1c72..877d9276c 100644 --- a/tests/data/test213 +++ b/tests/data/test213 @@ -6,6 +6,7 @@ HTTP POST HTTP CONNECT HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> @@ -79,24 +80,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP 1.0 proxy CONNECT auth NTLM and then POST - </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> +</name> +<command> http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit" </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -110,7 +101,7 @@ Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.0
Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test2300 b/tests/data/test2300 new file mode 100644 index 000000000..997acfad2 --- /dev/null +++ b/tests/data/test2300 @@ -0,0 +1,62 @@ +<testcase> +<info> +<keywords> +WebSockets +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 101 Switching to WebSockets swsclose
+Server: test-server/fake
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
+
+</data> +# allow upgrade +<servercmd> +upgrade +</servercmd> +</reply> + +# +# Client-side +<client> +# for the forced CURL_ENTROPY +<features> +debug +ws +</features> +<server> +http +</server> + <name> +WebSockets upgrade only + </name> + <command> +ws://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol nocheck="yes"> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Version: 13
+Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
+
+</protocol> +<errorcode> +52 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test2301 b/tests/data/test2301 new file mode 100644 index 000000000..1f8ed662b --- /dev/null +++ b/tests/data/test2301 @@ -0,0 +1,65 @@ +<testcase> +<info> +<keywords> +WebSockets +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes" nonewline="yes"> +HTTP/1.1 101 Switching to WebSockets
+Server: test-server/fake
+Upgrade: websocket
+Connection: Upgrade
+Something: else
+Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
+
+%hex[%89%00]hex% +</data> +# allow upgrade +<servercmd> +upgrade +</servercmd> +</reply> + +# +# Client-side +<client> +# require debug for the forced CURL_ENTROPY +<features> +debug +ws +</features> +<server> +http +</server> +<name> +WebSockets via callback (raw mode) + curl_ws_send() +</name> +<tool> +lib%TESTNUMBER +</tool> +<command> +ws://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol nocheck="yes" nonewline="yes"> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: webbie-sox/3
+Accept: */*
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Version: 13
+Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
+
+%hex[%8a%00]hex% +</protocol> +</verify> +</testcase> diff --git a/tests/data/test2302 b/tests/data/test2302 new file mode 100644 index 000000000..013c324e8 --- /dev/null +++ b/tests/data/test2302 @@ -0,0 +1,70 @@ +<testcase> +<info> +<keywords> +WebSockets +</keywords> +</info> + +# +# Sends a PING + a 5 byte hello TEXT +<reply> +<data nocheck="yes" nonewline="yes"> +HTTP/1.1 101 Switching to WebSockets
+Server: test-server/fake
+Upgrade: websocket
+Connection: Upgrade
+Something: else
+Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
+
+%hex[%89%00%81%05hello]hex% +</data> +# allow upgrade +<servercmd> +upgrade +</servercmd> +</reply> + +# +# Client-side +<client> +# require debug for the forced CURL_ENTROPY +<features> +debug +ws +</features> +<server> +http +</server> +<name> +WebSockets via callback (frame mode) + curl_ws_send() +</name> +<tool> +lib%TESTNUMBER +</tool> +<command> +ws://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# PONG with no data and the 32 bit mask +# +<verify> +<protocol nocheck="yes" nonewline="yes"> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: webbie-sox/3
+Accept: */*
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Version: 13
+Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
+
+%hex[%8a%808321]hex% +</protocol> +<stdout mode="text"> +68 65 6c 6c 6f +RECFLAGS: 1 +</stdout> +</verify> +</testcase> diff --git a/tests/data/test2303 b/tests/data/test2303 new file mode 100644 index 000000000..dbd1115c8 --- /dev/null +++ b/tests/data/test2303 @@ -0,0 +1,59 @@ +<testcase> +<info> +<keywords> +WebSockets +</keywords> +</info> + +# +<reply> +<data nocheck="yes" nonewline="yes"> +HTTP/1.1 200 Oblivious
+Server: test-server/fake
+Something: else
+Content-Length: 6
+
+hello +</data> +</reply> + +# +# Client-side +<client> +# require debug for the forced CURL_ENTROPY +<features> +debug +ws +</features> +<server> +http +</server> +<name> +WebSockets but gets a 200 back +</name> +<tool> +lib2302 +</tool> +<command> +ws://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: webbie-sox/3
+Accept: */*
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Version: 13
+Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
+
+</protocol> +# 22 == CURLE_HTTP_RETURNED_ERROR +<errorcode> +22 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test239 b/tests/data/test239 index 3ba2885a5..230fcc31a 100644 --- a/tests/data/test239 +++ b/tests/data/test239 @@ -5,6 +5,7 @@ HTTP HTTP POST HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> @@ -54,24 +55,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy-auth NTLM and then POST - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit" </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -88,7 +79,7 @@ Content-Type: application/x-www-form-urlencoded POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test243 b/tests/data/test243 index 337fef7ee..3952571b6 100644 --- a/tests/data/test243 +++ b/tests/data/test243 @@ -6,6 +6,7 @@ HTTP GET HTTP proxy HTTP proxy NTLM auth --proxy-anyauth +NTLM </keywords> </info> @@ -75,24 +76,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP POST with --proxy-anyauth, picking NTLM - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit" </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -117,7 +108,7 @@ Content-Type: application/x-www-form-urlencoded POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test245 b/tests/data/test245 index 2d19f0ded..569b4107d 100644 --- a/tests/data/test245 +++ b/tests/data/test245 @@ -45,7 +45,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test246 b/tests/data/test246 index 22b383370..383d07d9a 100644 --- a/tests/data/test246 +++ b/tests/data/test246 @@ -55,7 +55,7 @@ ok # Client-side <client> -# +# <server> http </server> diff --git a/tests/data/test258 b/tests/data/test258 index c0f8c18c7..748980007 100644 --- a/tests/data/test258 +++ b/tests/data/test258 @@ -56,6 +56,7 @@ ok http </server> <features> +Mime !SSPI crypto proxy diff --git a/tests/data/test259 b/tests/data/test259 index 4b5deee18..9f64cca12 100644 --- a/tests/data/test259 +++ b/tests/data/test259 @@ -52,6 +52,7 @@ ok http </server> <features> +Mime !SSPI crypto proxy diff --git a/tests/data/test262 b/tests/data/test262 Binary files differindex 43994b05f..d119d6672 100644 --- a/tests/data/test262 +++ b/tests/data/test262 diff --git a/tests/data/test265 b/tests/data/test265 index 889cf06c4..c6db8964e 100644 --- a/tests/data/test265 +++ b/tests/data/test265 @@ -6,6 +6,7 @@ HTTP POST HTTP CONNECT HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> @@ -80,24 +81,14 @@ http NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407 - </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> +</name> +<command> http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit" </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -111,7 +102,7 @@ Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test266 b/tests/data/test266 index 6b5d2e6c7..4f5f359d8 100644 --- a/tests/data/test266 +++ b/tests/data/test266 @@ -37,6 +37,9 @@ Connection: mooo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc chunky-trailer: header data
</datacheck> +<servercmd> +writedelay: 10 +</servercmd> </reply> # diff --git a/tests/data/test267 b/tests/data/test267 index a07f67e48..f24c7f6a9 100644 --- a/tests/data/test267 +++ b/tests/data/test267 @@ -4,6 +4,7 @@ HTTP HTTP POST HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -58,26 +59,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP POST with NTLM authorization and added custom headers - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no" </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -95,7 +86,7 @@ Content-Type: application/x-www-form-urlencoded POST /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Header1: yes
diff --git a/tests/data/test277 b/tests/data/test277 index 466b79374..62d264fa3 100644 --- a/tests/data/test277 +++ b/tests/data/test277 @@ -20,6 +20,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test3021 b/tests/data/test3021 index 1b23ff048..775dd91f8 100644 --- a/tests/data/test3021 +++ b/tests/data/test3021 @@ -33,7 +33,7 @@ SFTP correct sha256 host key <setenv> # Needed for MSYS2 to not treat the argument as a POSIX path list # that has to be converted to Windows paths -MSYS2_ARG_CONV_EXCL=/ +MSYS2_ARG_CONV_EXCL=* </setenv> <file name="log/file%TESTNUMBER.txt"> test diff --git a/tests/data/test3022 b/tests/data/test3022 index 3e117701a..a9dbcb0f2 100644 --- a/tests/data/test3022 +++ b/tests/data/test3022 @@ -33,7 +33,7 @@ SCP correct sha256 host key <setenv> # Needed for MSYS2 to not treat the argument as a POSIX path list # that has to be converted to Windows paths -MSYS2_ARG_CONV_EXCL=/ +MSYS2_ARG_CONV_EXCL=* </setenv> <file name="log/file%TESTNUMBER.txt"> test diff --git a/tests/data/test3026 b/tests/data/test3026 new file mode 100644 index 000000000..ee9b30678 --- /dev/null +++ b/tests/data/test3026 @@ -0,0 +1,45 @@ +<testcase> +<info> +<keywords> +curl_global_init +thread-safe +slow +</keywords> +</info> + +# +# Server-side +<reply> +</reply> + +# +# Client-side +<client> +# require the threaded resolver only because it means pthreads might +# be used for it +<features> +threadsafe +threaded-resolver +</features> +<server> +none +</server> +<name> +curl_global_init thread-safety +</name> +<tool> +lib%TESTNUMBER +</tool> +<command> +none +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<errorcode> +0 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test3027 b/tests/data/test3027 new file mode 100644 index 000000000..6d7aeb620 --- /dev/null +++ b/tests/data/test3027 @@ -0,0 +1,55 @@ +<testcase> +<info> +<keywords> +FTP +CURLOPT_FILETIME +MDTM fail +</keywords> +</info> + +# Server-side +<reply> +<servercmd> +REPLY MDTM 550 Permission denied +</servercmd> +<data> +data blobb +</data> + +# data is sent to stdout +</reply> + +# Client-side +<client> +<server> +ftp +</server> + <name> +Get a file via FTP but 550 after MDTM command + </name> +<tool> +lib3027 +</tool> +<command option="no-include"> +ftp://%HOSTIP:%FTPPORT/%TESTNUMBER +</command> +<stdout> +data blobb +</stdout> +</client> + +# Verify data after the test has been "shot" +<verify> +<protocol> +USER anonymous
+PASS ftp@example.com
+PWD
+MDTM %TESTNUMBER
+EPSV
+TYPE I
+SIZE %TESTNUMBER
+RETR %TESTNUMBER
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test304 b/tests/data/test304 index b4030725d..b632af74f 100644 --- a/tests/data/test304 +++ b/tests/data/test304 @@ -21,6 +21,7 @@ blablabla # Client-side <client> <features> +Mime SSL </features> <server> diff --git a/tests/data/test31 b/tests/data/test31 index ac277264d..6dfd2d268 100644 --- a/tests/data/test31 +++ b/tests/data/test31 @@ -22,6 +22,7 @@ Server: test-server/fake Content-Length: 4
Content-Type: text/html
Funny-head: yesyes
+Set-Cookie: blankdomain=sure; domain=; path=/ %if !hyper Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure
Set-Cookie:ismatch=this ; domain=test31.curl; path=/silly/
@@ -162,6 +163,7 @@ test31.curl FALSE /we/want/ FALSE 2118138987 nodomain value #HttpOnly_.test31.curl TRUE /p1/ FALSE 0 httpo1 value1 .test31.curl TRUE /overwrite FALSE 0 overwrite this2 .test31.curl TRUE /silly/ FALSE 0 ismatch this +test31.curl FALSE / FALSE 0 blankdomain sure </file> </verify> </testcase> diff --git a/tests/data/test356 b/tests/data/test356 index 0f8795899..9f6459487 100644 --- a/tests/data/test356 +++ b/tests/data/test356 @@ -16,7 +16,9 @@ Content-Length: 6 Connection: close Content-Type: text/html Funny-head: yesyes +Alt-Svc: h1="nowhere.foo:-1" Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82" +Alt-Svc: h1="nowhere.foo:70000" -foo- </data> diff --git a/tests/data/test358 b/tests/data/test358 index d1ddc1b9e..0f8a9801b 100644 --- a/tests/data/test358 +++ b/tests/data/test358 @@ -12,14 +12,14 @@ HTTP/2 # Server-side <reply> <data nocheck="yes"> -HTTP/1.1 200 OK -Date: Tue, 09 Nov 2010 14:49:00 GMT -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes -Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0 - +HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
+
-foo- </data> </reply> @@ -30,6 +30,7 @@ Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0 <features> alt-svc debug +h2c </features> <server> http diff --git a/tests/data/test359 b/tests/data/test359 index c1b1cb86c..0e684e39e 100644 --- a/tests/data/test359 +++ b/tests/data/test359 @@ -12,14 +12,14 @@ HTTP/2 # Server-side <reply> <data nocheck="yes"> -HTTP/1.1 200 OK -Date: Tue, 09 Nov 2010 14:49:00 GMT -Content-Length: 6 -Connection: close -Content-Type: text/html -Funny-head: yesyes -Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0 - +HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
+
-foo- </data> </reply> @@ -30,6 +30,7 @@ Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0 <features> alt-svc debug +h2c </features> <server> https diff --git a/tests/data/test368 b/tests/data/test368 index 2f13b5723..505ce34ea 100644 --- a/tests/data/test368 +++ b/tests/data/test368 @@ -27,7 +27,7 @@ Connection: close http </server> <name> -Appened dash if -r range specified without one +Append dash if -r range specified without one </name> <command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -r 4 diff --git a/tests/data/test372 b/tests/data/test372 new file mode 100644 index 000000000..e1cf356dd --- /dev/null +++ b/tests/data/test372 @@ -0,0 +1,49 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> + +<reply> +<data> +HTTP/1.1 200 OK
+Date: Thu, 22 Jul 2010 11:22:33 GMT
+Connection: close
+Content-Type: text/html
+X-Control: swsclose
+Content-Length: 2
+
+%hex[%00]hex% +</data> +</reply> + +<client> +<server> +http +</server> +<name> +Binary zero in data element. +</name> +<features> +proxy +</features> +<command> +--raw http://%HOSTIP:%HTTPPORT/binary-zero-in-data-section/%TESTNUMBER +</command> +</client> + +<verify> +<protocol> +GET /binary-zero-in-data-section/%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<errorcode> +0 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test373 b/tests/data/test373 new file mode 100644 index 000000000..b11f227f2 --- /dev/null +++ b/tests/data/test373 @@ -0,0 +1,78 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +chunked transfer encoding +</keywords> +</info> + +<reply> +<data> +HTTP/1.1 200 OK
+Date: Thu, 22 Jul 2010 11:22:33 GMT
+Connection: close
+Content-Type: text/html
+Transfer-Encoding: chunked
+X-Control: swsclose
+
+100
+%repeat[255 x %00]% +
+100
+%repeat[255 x %00]% +
+100
+%repeat[255 x %00]% +
+100
+%repeat[255 x %00]% +
+0
+
+</data> + +<datacheck> +HTTP/1.1 200 OK
+Date: Thu, 22 Jul 2010 11:22:33 GMT
+Connection: close
+Content-Type: text/html
+Transfer-Encoding: chunked
+X-Control: swsclose
+
+%repeat[255 x %00]% +%repeat[255 x %00]% +%repeat[255 x %00]% +%repeat[255 x %00]% +</datacheck> + +</reply> + +<client> +<server> +http +</server> +<name> +Chunked transfer encoding - Multiple valid chunks with binary zeros. +</name> +<features> +proxy +</features> +<command> +http://%HOSTIP:%HTTPPORT/chunked-transfer-encoding/%TESTNUMBER +</command> +</client> + +<verify> +<protocol> +GET /chunked-transfer-encoding/%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<errorcode> +0 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test374 b/tests/data/test374 new file mode 100644 index 000000000..d85bb7855 --- /dev/null +++ b/tests/data/test374 @@ -0,0 +1,49 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +gif data +</keywords> +</info> + +<reply> +<data nonewline="yes"> +HTTP/1.1 200 OK
+Date: Thu, 22 Jul 2010 11:22:33 GMT
+Connection: close
+Content-Type: image/gif
+X-Control: swsclose
+
+%hex[%47%49%46%38%39%61%14%00%14%00%a1%04%00%fe%00%00%ff%00%00%1e%42%ee%1f%42%ef%21%ff%0b%4e%45%54%53%43%41%50%45%32%2e%30%03%01%00%00%00%21%fe%24%43%72%65%61%74%65%64%20%62%79%20%46%61%62%69%61%6e%20%4b%65%69%6c%20%77%69%74%68%20%54%68%65%20%47%49%4d%50%00%21%f9%04%00%0a%00%ff%00%2c%00%00%00%00%14%00%14%00%00%02%11%8c%8f%a9%cb%ed%0f%a3%9c%b4%da%8b%b3%de%bc%fb%af%15%00%21%f9%04%01%0a%00%02%00%2c%00%00%00%00%14%00%14%00%00%02%11%9c%8f%a9%cb%ed%0f%a3%9c%b4%da%8b%b3%de%bc%fb%af%15%00%21%f9%04%00%0a%00%ff%00%2c%00%00%00%00%14%00%14%00%00%02%11%94%8f%a9%cb%ed%0f%a3%9c%b4%da%8b%b3%de%bc%fb%af%15%00%21%f9%04%00%0a%00%ff%00%2c%00%00%00%00%14%00%14%00%00%02%11%84%8f%a9%cb%ed%0f%a3%9c%b4%da%8b%b3%de%bc%fb%af%15%00%3b]hex% +</data> +</reply> + +<client> +<server> +http +</server> +<name> +Valid gif with two frames. No new line in data section. +</name> +<features> +proxy +</features> +<command> +http://%HOSTIP:%HTTPPORT/gif/%TESTNUMBER +</command> +</client> + +<verify> +<protocol> +GET /gif/%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<errorcode> +0 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test375 b/tests/data/test375 new file mode 100644 index 000000000..aefc8e4ac --- /dev/null +++ b/tests/data/test375 @@ -0,0 +1,33 @@ +<testcase> +<info> +<keywords> +CURL_DISABLE_PROXY +</keywords> +</info> + +<client> +<features> +!proxy +</features> +<server> +none +</server> +<name> +Disabled proxy should make curl fail with --proxy +</name> +<command> +-x wohoo http://example.com/ +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<stderr mode="text"> +curl: proxy support is disabled in this libcurl +</stderr> +<errorcode> +4 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test376 b/tests/data/test376 new file mode 100644 index 000000000..34924c7ec --- /dev/null +++ b/tests/data/test376 @@ -0,0 +1,64 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> + +# +# Crafted to cause error 18 +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK swsclose +Date: Tue, 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: 75 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +--remove-on-error + </name> + <command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/save-%TESTNUMBER --remove-on-error +</command> +</client> + +# +# Verify data after the test has been "shot". hyper doesn't do error 18 +<verify> +<errorcode> +%if hyper +56 +%else +18 +%endif +</errorcode> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> + +# the file should be empty now +<file name="log/save-%TESTNUMBER"> +</file> +</verify> +</testcase> diff --git a/tests/data/test378 b/tests/data/test378 new file mode 100644 index 000000000..650e7d4e1 --- /dev/null +++ b/tests/data/test378 @@ -0,0 +1,39 @@ +<testcase> +<info> +<keywords> +HTTP PUT +HTTP POST +</keywords> +</info> + +# +# Server-side +<reply> +</reply> + +# +# Client-side +<client> +<server> +none +</server> + <name> +Reject using -T and -d at once + </name> + <command> +-T log/%TESTNUMBER -d input http://never-accessed +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<errorcode> +2 +</errorcode> +<stderr mode="text"> +Warning: You can only select one HTTP request method! You asked for both PUT +Warning: (-T, --upload-file) and POST (-d, --data). +</stderr> +</verify> +</testcase> diff --git a/tests/data/test379 b/tests/data/test379 new file mode 100644 index 000000000..c7ffc1714 --- /dev/null +++ b/tests/data/test379 @@ -0,0 +1,71 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> + +# +# Crafted to cause error +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK swsclose +Date: Tue, 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: 75 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<file name="log/save"> +exists before command runs +</file> +<server> +http +</server> + <name> +--remove-on-error with --no-clobber and an added number + </name> + <command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/save --remove-on-error --no-clobber +</command> +</client> + +# +# Verify data after the test has been "shot". hyper doesn't do error 18 +<verify> +<errorcode> +%if hyper +56 +%else +18 +%endif +</errorcode> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> + +# this file should be untouched +<file name="log/save"> +exists before command runs +</file> +# the file should be empty now +<file2 name="log/save.1"> +</file2> +</verify> +</testcase> diff --git a/tests/data/test380 b/tests/data/test380 new file mode 100644 index 000000000..a1849c178 --- /dev/null +++ b/tests/data/test380 @@ -0,0 +1,63 @@ +<testcase> +<info> +<keywords> +FTP +EPSV +LIST +netrc +</keywords> +</info> +# +# Server-side +<reply> +# When doing LIST, we get the default list output hard-coded in the test +# FTP server +<datacheck mode="text"> +total 20 +drwxr-xr-x 8 98 98 512 Oct 22 13:06 . +drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. +drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT +-r--r--r-- 1 0 1 35 Jul 16 1996 README +lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin +dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev +drwxrwxrwx 2 98 98 512 May 29 16:04 download.html +dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc +drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub +dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +ftp +</server> +<name> +pick netrc password based on user name in URL +</name> + +<command> +--netrc --netrc-file log/netrc%TESTNUMBER ftp://mary@%HOSTIP:%FTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +# the following two lines were created while testing curl +machine %HOSTIP login frankenstein password wrongone +machine %HOSTIP login mary password yram +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +USER mary
+PASS yram
+PWD
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test381 b/tests/data/test381 new file mode 100644 index 000000000..c44fa74bc --- /dev/null +++ b/tests/data/test381 @@ -0,0 +1,67 @@ +<testcase> +<info> +<keywords> +FTP +EPSV +LIST +netrc +</keywords> +</info> +# +# Server-side +<reply> +# When doing LIST, we get the default list output hard-coded in the test +# FTP server +<datacheck mode="text"> +total 20 +drwxr-xr-x 8 98 98 512 Oct 22 13:06 . +drwxr-xr-x 8 98 98 512 Oct 22 13:06 .. +drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT +-r--r--r-- 1 0 1 35 Jul 16 1996 README +lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin +dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev +drwxrwxrwx 2 98 98 512 May 29 16:04 download.html +dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc +drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub +dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +ftp +</server> + +# When CURL_NETRC_REQUIRED is set, the password in the URL is ignored and +# using the netrc is mandatory. +# +<name> +netrc-optional lets URL creds override netrc +</name> + +<command> +--netrc-optional --netrc-file log/netrc%TESTNUMBER ftp://mary:drfrank@%HOSTIP:%FTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +# the following two lines were created while testing curl +machine %HOSTIP login frankenstein password wrongone +machine %HOSTIP login mary password yram +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +USER mary
+PASS drfrank
+PWD
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test383 b/tests/data/test383 new file mode 100644 index 000000000..6ba8f5e2d --- /dev/null +++ b/tests/data/test383 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP POST +--json +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<server> +http +</server> + <name> +HTTP with --json + </name> + <command> +--json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol nonewline="yes"> +POST /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Content-Type: application/json
+Accept: application/json
+Content-Length: 20
+
+{ "drink": "coffe" } +</protocol> +</verify> +</testcase> diff --git a/tests/data/test384 b/tests/data/test384 new file mode 100644 index 000000000..9651f9f95 --- /dev/null +++ b/tests/data/test384 @@ -0,0 +1,59 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP POST +--json +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<server> +http +</server> + <name> +HTTP with --json from stdin + </name> +<stdin> +{ "drink": "coffe" } +</stdin> +<command> +--json @- http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Accept: foobar/*" +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +POST /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: foobar/*
+Content-Type: application/json
+Content-Length: 21
+
+{ "drink": "coffe" } +</protocol> +</verify> +</testcase> diff --git a/tests/data/test385 b/tests/data/test385 new file mode 100644 index 000000000..ee543fa64 --- /dev/null +++ b/tests/data/test385 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP POST +--json +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<server> +http +</server> + <name> +HTTP with --json x 2 + </name> + <command> +--json '{ "drink": "coffe",' --json ' "crunch": "cookie" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Content-Type: drinks/hot" +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol nonewline="yes"> +POST /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Content-Type: drinks/hot
+Accept: application/json
+Content-Length: 40
+
+{ "drink": "coffe", "crunch": "cookie" } +</protocol> +</verify> +</testcase> diff --git a/tests/data/test386 b/tests/data/test386 new file mode 100644 index 000000000..5e2fd6adf --- /dev/null +++ b/tests/data/test386 @@ -0,0 +1,74 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP POST +--json +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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> +<data2> +HTTP/1.1 200 OK +Date: Tue, 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 + +hello +</data2> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +HTTP with --json + --next + </name> + <command> +--json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +POST /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Content-Type: application/json
+Accept: application/json
+Content-Length: 20
+
+{ "drink": "coffe" }GET /%TESTNUMBER0002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test387 b/tests/data/test387 new file mode 100644 index 000000000..015ec25f1 --- /dev/null +++ b/tests/data/test387 @@ -0,0 +1,53 @@ +<testcase> +<info> +<keywords> +HTTP +gzip +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK
+Transfer-Encoding: gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip,gzip
+
+-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +Response with overly long compression chain + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -sS +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> + +# CURLE_BAD_CONTENT_ENCODING is 61 +<errorcode> +61 +</errorcode> +<stderr mode="text"> +curl: (61) Reject response due to 5 content encodings +</stderr> +</verify> +</testcase> diff --git a/tests/data/test388 b/tests/data/test388 new file mode 100644 index 000000000..3a0214a0b --- /dev/null +++ b/tests/data/test388 @@ -0,0 +1,156 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +HTTP Digest auth +</keywords> +</info> + +# Server-side +<reply> +# First reply back and ask for Digest auth +<data1> +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 +</data1> + +# second reply back +<data2> +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 +</data2> + +# This is supposed to be returned when the server gets a +# Authorization: Digest line passed-in from the client +<data1001> +HTTP/1.1 200 OK
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+
+This IS the real page! +</data1001> + +# +# This is the second request, and this sends back a response saying that +# the request contained stale data. We want an update. Set swsbounce to +# bounce on to data1003 on the second request. +<data1002> +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="crazy, auth"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 26
+
+This is not the real page +</data1002> + +# The second request to the 1002 section will bounce this one back instead +# thanks to the swsbounce keyword up there +<data1003> +HTTP/1.1 200 OK
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 30
+
+This IS the second real page! +</data1003> +</reply> + +# Client-side +<client> +<server> +http +</server> +<features> +!SSPI +crypto +</features> + <name> +HTTP with Digest and multiple qop values with leading space + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -u testuser:testpass --digest http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 +</command> +</client> + +# Verify data after the test has been "shot" +<verify> +<strip> +^Authorization.*cnonce +</strip> +<protocol> +GET /%TESTNUMBER0001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /%TESTNUMBER0001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER0001", response="ea598bbfdb5c54b7352c977e3885e44d"
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /%TESTNUMBER0002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /%TESTNUMBER0002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER0002", response="921a8e6db782d6359db1f40d9ed7e6a6"
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /%TESTNUMBER0002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<stdout> +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 200 OK
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+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="crazy, auth"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 26
+
+HTTP/1.1 200 OK
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 30
+
+This IS the second real page! +</stdout> +</verify> +</testcase> diff --git a/tests/data/test389 b/tests/data/test389 new file mode 100644 index 000000000..f805bc277 --- /dev/null +++ b/tests/data/test389 @@ -0,0 +1,57 @@ +<testcase> +<info> +<keywords> +HTTP +.localhost +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<server> +http +</server> + <name> +*.localhost is a local host + </name> + <command> +http://curlmachine.localhost:%HTTPPORT/%TESTNUMBER +</command> +# Ensure that we're running on localhost +<precheck> +perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );" +</precheck> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: curlmachine.localhost:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test39 b/tests/data/test39 index 81c7119bc..f48e639f8 100644 --- a/tests/data/test39 +++ b/tests/data/test39 @@ -19,6 +19,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test390 b/tests/data/test390 new file mode 100644 index 000000000..80e8c2b70 --- /dev/null +++ b/tests/data/test390 @@ -0,0 +1,48 @@ +<testcase> +<info> +<keywords> +HTTP +FTP +parallel +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Content-Length: 10001 +Content-Type: text/html + +%repeat[1000 x hellohttp!]% +</data> + +<data2 nocheck="yes"> +%repeat[1000 x hello ftp!]% +</data2> + +</reply> + +# +# Client-side +<client> +<file name="log/test%TESTNUMBER.txt"> +%repeat[1000 x hellofile!]% +</file> +<server> +http +ftp +</server> +<name> +curl HTTP, FILE and FTP in parallel +</name> +<command option="no-output"> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER file://localhost%FILE_PWD/log/test%TESTNUMBER.txt ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 --parallel -o log/%TESTNUMBER.a -o log/%TESTNUMBER.b -o log/%TESTNUMBER.c +</command> +</client> + +# +<verify> +</verify> +</testcase> diff --git a/tests/data/test391 b/tests/data/test391 new file mode 100644 index 000000000..1eff2ef3e --- /dev/null +++ b/tests/data/test391 @@ -0,0 +1,72 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +--path-as-is +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 301 OK +Content-Length: 6 +Content-Type: text/html +Location: ../%TESTNUMBER0002 + +-foo- +</data> +<data2> +HTTP/1.1 200 OK +Content-Length: 6 +Content-Type: text/html + +-muu- +</data2> +<datacheck> +HTTP/1.1 301 OK +Content-Length: 6 +Content-Type: text/html +Location: ../%TESTNUMBER0002 + +HTTP/1.1 200 OK +Content-Length: 6 +Content-Type: text/html + +-muu- +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +--path-as-is with redirect, keeping dotdots + </name> + <command> +http://%HOSTIP:%HTTPPORT/../../%TESTNUMBER --path-as-is -L +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /../../%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /../%TESTNUMBER0002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test398 b/tests/data/test398 new file mode 100644 index 000000000..b949064d2 --- /dev/null +++ b/tests/data/test398 @@ -0,0 +1,64 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> +# +# Server-side +<reply> + +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Tue, 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 + +hello +</data> +<datacheck> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +Reject HTTP/1.1 response with colon-less header + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<errorcode> +%if hyper +1 +%else +8 +%endif +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test399 b/tests/data/test399 new file mode 100644 index 000000000..da4bae5fd --- /dev/null +++ b/tests/data/test399 @@ -0,0 +1,32 @@ +<testcase> +<info> +<keywords> +URL +</keywords> +</info> + + +# +# Client-side +<client> +<server> +http +</server> +<name> +65536 bytes long host name in URL +</name> +<file name="log/input%TESTNUM"> +url = http://%repeat[65536 x a]%/399 +</file> +<command> +-K log/input%TESTNUM +</command> +</client> + +<verify> +# 3 == CURLE_URL_MALFORMAT +<errorcode> +3 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test41 b/tests/data/test41 index aaf0ae78b..7a133307d 100644 --- a/tests/data/test41 +++ b/tests/data/test41 @@ -12,6 +12,9 @@ FAILURE # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test411 b/tests/data/test411 new file mode 100644 index 000000000..912f07c6c --- /dev/null +++ b/tests/data/test411 @@ -0,0 +1,43 @@ +<testcase> +<info> +<keywords> +-K +</keywords> +</info> + +# +# Server-side +<reply> +</reply> + +# +# Client-side +<client> +<server> +none +</server> + <name> +-K with missing file causes error + </name> + <command> +-K log/missing http://localhost +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<stderr mode="text"> +curl: cannot read config from 'log/missing' +curl: option -K: error encountered when reading a file +%if manual +curl: try 'curl --help' or 'curl --manual' for more information +%else +curl: try 'curl --help' for more information +%endif +</stderr> +<errorcode> +26 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test412 b/tests/data/test412 new file mode 100644 index 000000000..0dbc0cea2 --- /dev/null +++ b/tests/data/test412 @@ -0,0 +1,64 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +Alt-Svc +trailing-dot +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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 +debug +</features> +<server> +http +</server> + <name> +alt-svc using host name with trailing dot in URL + </name> +<setenv> +# make debug-curl accept Alt-Svc over plain HTTP +CURL_ALTSVC_HTTP="yeah" +</setenv> + <command> +--alt-svc "log/altsvc-%TESTNUMBER" "http://whohoo.:12345/%TESTNUMBER" +</command> +<file name="log/altsvc-%TESTNUMBER"> +h1 whohoo 12345 h1 %HOSTIP %HTTPPORT "20290222 22:19:28" 0 0 +</file> + +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: whohoo.:12345
+User-Agent: curl/%VERSION
+Accept: */*
+Alt-Used: %HOSTIP:%HTTPPORT
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test413 b/tests/data/test413 new file mode 100644 index 000000000..975b3e37c --- /dev/null +++ b/tests/data/test413 @@ -0,0 +1,64 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +Alt-Svc +trailing-dot +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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 +debug +</features> +<server> +http +</server> + <name> +alt-svc using host name with trailing dot on host from file + </name> +<setenv> +# make debug-curl accept Alt-Svc over plain HTTP +CURL_ALTSVC_HTTP="yeah" +</setenv> + <command> +--alt-svc "log/altsvc-%TESTNUMBER" "http://whohoo:12345/%TESTNUMBER" +</command> +<file name="log/altsvc-%TESTNUMBER"> +h1 whohoo. 12345 h1 %HOSTIP %HTTPPORT "20290222 22:19:28" 0 0 +</file> + +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: whohoo:12345
+User-Agent: curl/%VERSION
+Accept: */*
+Alt-Used: %HOSTIP:%HTTPPORT
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test414 b/tests/data/test414 new file mode 100644 index 000000000..2211d0f40 --- /dev/null +++ b/tests/data/test414 @@ -0,0 +1,84 @@ +<testcase> +<info> +<keywords> +HTTP +cookies +--resolve +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 301 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Set-Cookie: SESSIONID=originaltoken; secure +Set-Cookie: second=originaltoken; secure; path=/a +Location: http://attack.invalid:%HTTPPORT/a/b/%TESTNUMBER0002 + +-foo- +</data> + +<data2> +HTTP/1.1 301 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Set-Cookie: SESSIONID=hacker; domain=attack.invalid; +Set-Cookie: second=replacement; path=/a/b +Location: https://attack.invalid:%HTTPSPORT/a/b/%TESTNUMBER0003 + +-foo- +</data2> + +<data3> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 + +-foo- +</data3> +</reply> + +# +# Client-side +<client> +<server> +http +https +</server> +<name> +HTTPS sec-cookie, HTTP redirect, same name cookie, redirect back +</name> +<command> +https://attack.invalid:%HTTPSPORT/a/b/%TESTNUMBER -k -c log/cookie%TESTNUMBER --resolve attack.invalid:%HTTPSPORT:%HOSTIP --resolve attack.invalid:%HTTPPORT:%HOSTIP -L +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /a/b/%TESTNUMBER HTTP/1.1
+Host: attack.invalid:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /a/b/%TESTNUMBER0002 HTTP/1.1
+Host: attack.invalid:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /a/b/%TESTNUMBER0003 HTTP/1.1
+Host: attack.invalid:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+Cookie: SESSIONID=originaltoken; second=originaltoken
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test415 b/tests/data/test415 new file mode 100644 index 000000000..e65968043 --- /dev/null +++ b/tests/data/test415 @@ -0,0 +1,65 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK swsclose +Date: Tue, 09 Nov 2010 14:49:00 GMT +Content-Length:
-6 +Content-Type: text/html +Funny-head: yesyes + +moooooooooooo +</data> +<datacheck> +%if hyper +%else +HTTP/1.1 200 OK swsclose +Date: Tue, 09 Nov 2010 14:49:00 GMT +%endif +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +HTTP response with control code then negative Content-Length + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> + +# Hyper curl returns unsupported protocol +# bullt-in curl returns weird_server_reply +<errorcode> +%if hyper +1 +%else +8 +%endif +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test435 b/tests/data/test435 index eed9e2981..cfcca66dc 100644 --- a/tests/data/test435 +++ b/tests/data/test435 @@ -23,7 +23,7 @@ Content-Length: 0 http </server> <name> -verify -w local/remote port+ip after connecton re-use +verify -w local/remote port+ip after connection re-use </name> <command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w 'local port == %{local_port}\nlocal ip == %{local_ip}\nremote_ip == %{remote_ip}\nremote_port == %{remote_port}\n' diff --git a/tests/data/test436 b/tests/data/test436 new file mode 100644 index 000000000..0a62cfb97 --- /dev/null +++ b/tests/data/test436 @@ -0,0 +1,58 @@ +<testcase> +<info> +<keywords> +--config +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK
+Content-Length: 6
+Content-Type: text/1
+
+-foo- +</data> +</reply> + +# +# Client-side +<client> +<file1 name="log/.config/curlrc"> +--next +header = "a: a" +data = "curlrc read" +</file1> +<server> +http +</server> +<setenv> +CURL_HOME=%PWD/log +XDG_CONFIG_HOME= +</setenv> +<name> +Find .curlrc in .config/curlrc via CURL_HOME +</name> +<command> +%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol nonewline="yes"> +POST /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+a: a
+Content-Length: 11
+Content-Type: application/x-www-form-urlencoded
+
+curlrc read +</protocol> +</verify> +</testcase> diff --git a/tests/data/test44 b/tests/data/test44 index 0ec2f4b79..4f39bc1eb 100644 --- a/tests/data/test44 +++ b/tests/data/test44 @@ -20,6 +20,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test440 b/tests/data/test440 new file mode 100644 index 000000000..0986cda1a --- /dev/null +++ b/tests/data/test440 @@ -0,0 +1,73 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +HSTS +trailing-dot +</keywords> +</info> + +<reply> + +# we use this as response to a CONNECT +<connect nocheck="yes"> +HTTP/1.1 403 not OK at all
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+-foo- +</connect> +</reply> + +<client> +<server> +http +</server> +<features> +HSTS +proxy +https +</features> + +# no trailing dot in the file only in the URL +<file name="log/input%TESTNUMBER"> +this.hsts.example "99991001 04:47:41" +</file> + +<name> +HSTS with trailing-dot host name in URL but none in hsts file +</name> +<command> +-x http://%HOSTIP:%HTTPPORT http://this.hsts.example./%TESTNUMBER --hsts log/input%TESTNUMBER -w '%{url_effective}\n' +</command> +</client> + +<verify> +# we let it CONNECT to the server to confirm HSTS but deny from there +<protocol> +CONNECT this.hsts.example.:443 HTTP/1.1
+Host: this.hsts.example.:443
+User-Agent: curl/%VERSION
+Proxy-Connection: Keep-Alive
+
+</protocol> +<stdout> +HTTP/1.1 403 not OK at all
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+https://this.hsts.example./%TESTNUMBER +</stdout> +# Proxy CONNECT aborted +<errorcode> +56 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test441 b/tests/data/test441 new file mode 100644 index 000000000..6fbf7be3b --- /dev/null +++ b/tests/data/test441 @@ -0,0 +1,73 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +HSTS +trailing-dot +</keywords> +</info> + +<reply> + +# we use this as response to a CONNECT +<connect nocheck="yes"> +HTTP/1.1 403 not OK at all
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+-foo- +</connect> +</reply> + +<client> +<server> +http +</server> +<features> +HSTS +proxy +https +</features> + +# no trailing dot in the file only in the URL +<file name="log/input%TESTNUMBER"> +this.hsts.example. "99991001 04:47:41" +</file> + +<name> +HSTS with no t-dot host name in URL but t-dot in file +</name> +<command> +-x http://%HOSTIP:%HTTPPORT http://this.hsts.example/%TESTNUMBER --hsts log/input%TESTNUMBER -w '%{url_effective}\n' +</command> +</client> + +<verify> +# we let it CONNECT to the server to confirm HSTS but deny from there +<protocol> +CONNECT this.hsts.example:443 HTTP/1.1
+Host: this.hsts.example:443
+User-Agent: curl/%VERSION
+Proxy-Connection: Keep-Alive
+
+</protocol> +<stdout> +HTTP/1.1 403 not OK at all
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+https://this.hsts.example/%TESTNUMBER +</stdout> +# Proxy CONNECT aborted +<errorcode> +56 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test442 b/tests/data/test442 new file mode 100644 index 000000000..baab4aade --- /dev/null +++ b/tests/data/test442 @@ -0,0 +1,210 @@ +<testcase> +# perl: +# +# for(1 .. 151) { +# print join("\t", +# "attack.invalid", "TRUE", "/", "FALSE", "0", +# "name$_", "could-be-large-$_")."\n"; +# } +# +<info> +<keywords> +HTTP +cookies +--resolve +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<name> +Send capped huge number of matching cookies +</name> +<command> +http://attack.invalid:%HTTPPORT/a/b/%TESTNUMBER -b log/cookie%TESTNUMBER --resolve attack.invalid:%HTTPPORT:%HOSTIP -L +</command> +<file name="log/cookie%TESTNUMBER" mode="text"> +attack.invalid TRUE / FALSE 0 name1 could-be-large-1 +attack.invalid TRUE / FALSE 0 name2 could-be-large-2 +attack.invalid TRUE / FALSE 0 name3 could-be-large-3 +attack.invalid TRUE / FALSE 0 name4 could-be-large-4 +attack.invalid TRUE / FALSE 0 name5 could-be-large-5 +attack.invalid TRUE / FALSE 0 name6 could-be-large-6 +attack.invalid TRUE / FALSE 0 name7 could-be-large-7 +attack.invalid TRUE / FALSE 0 name8 could-be-large-8 +attack.invalid TRUE / FALSE 0 name9 could-be-large-9 +attack.invalid TRUE / FALSE 0 name10 could-be-large-10 +attack.invalid TRUE / FALSE 0 name11 could-be-large-11 +attack.invalid TRUE / FALSE 0 name12 could-be-large-12 +attack.invalid TRUE / FALSE 0 name13 could-be-large-13 +attack.invalid TRUE / FALSE 0 name14 could-be-large-14 +attack.invalid TRUE / FALSE 0 name15 could-be-large-15 +attack.invalid TRUE / FALSE 0 name16 could-be-large-16 +attack.invalid TRUE / FALSE 0 name17 could-be-large-17 +attack.invalid TRUE / FALSE 0 name18 could-be-large-18 +attack.invalid TRUE / FALSE 0 name19 could-be-large-19 +attack.invalid TRUE / FALSE 0 name20 could-be-large-20 +attack.invalid TRUE / FALSE 0 name21 could-be-large-21 +attack.invalid TRUE / FALSE 0 name22 could-be-large-22 +attack.invalid TRUE / FALSE 0 name23 could-be-large-23 +attack.invalid TRUE / FALSE 0 name24 could-be-large-24 +attack.invalid TRUE / FALSE 0 name25 could-be-large-25 +attack.invalid TRUE / FALSE 0 name26 could-be-large-26 +attack.invalid TRUE / FALSE 0 name27 could-be-large-27 +attack.invalid TRUE / FALSE 0 name28 could-be-large-28 +attack.invalid TRUE / FALSE 0 name29 could-be-large-29 +attack.invalid TRUE / FALSE 0 name30 could-be-large-30 +attack.invalid TRUE / FALSE 0 name31 could-be-large-31 +attack.invalid TRUE / FALSE 0 name32 could-be-large-32 +attack.invalid TRUE / FALSE 0 name33 could-be-large-33 +attack.invalid TRUE / FALSE 0 name34 could-be-large-34 +attack.invalid TRUE / FALSE 0 name35 could-be-large-35 +attack.invalid TRUE / FALSE 0 name36 could-be-large-36 +attack.invalid TRUE / FALSE 0 name37 could-be-large-37 +attack.invalid TRUE / FALSE 0 name38 could-be-large-38 +attack.invalid TRUE / FALSE 0 name39 could-be-large-39 +attack.invalid TRUE / FALSE 0 name40 could-be-large-40 +attack.invalid TRUE / FALSE 0 name41 could-be-large-41 +attack.invalid TRUE / FALSE 0 name42 could-be-large-42 +attack.invalid TRUE / FALSE 0 name43 could-be-large-43 +attack.invalid TRUE / FALSE 0 name44 could-be-large-44 +attack.invalid TRUE / FALSE 0 name45 could-be-large-45 +attack.invalid TRUE / FALSE 0 name46 could-be-large-46 +attack.invalid TRUE / FALSE 0 name47 could-be-large-47 +attack.invalid TRUE / FALSE 0 name48 could-be-large-48 +attack.invalid TRUE / FALSE 0 name49 could-be-large-49 +attack.invalid TRUE / FALSE 0 name50 could-be-large-50 +attack.invalid TRUE / FALSE 0 name51 could-be-large-51 +attack.invalid TRUE / FALSE 0 name52 could-be-large-52 +attack.invalid TRUE / FALSE 0 name53 could-be-large-53 +attack.invalid TRUE / FALSE 0 name54 could-be-large-54 +attack.invalid TRUE / FALSE 0 name55 could-be-large-55 +attack.invalid TRUE / FALSE 0 name56 could-be-large-56 +attack.invalid TRUE / FALSE 0 name57 could-be-large-57 +attack.invalid TRUE / FALSE 0 name58 could-be-large-58 +attack.invalid TRUE / FALSE 0 name59 could-be-large-59 +attack.invalid TRUE / FALSE 0 name60 could-be-large-60 +attack.invalid TRUE / FALSE 0 name61 could-be-large-61 +attack.invalid TRUE / FALSE 0 name62 could-be-large-62 +attack.invalid TRUE / FALSE 0 name63 could-be-large-63 +attack.invalid TRUE / FALSE 0 name64 could-be-large-64 +attack.invalid TRUE / FALSE 0 name65 could-be-large-65 +attack.invalid TRUE / FALSE 0 name66 could-be-large-66 +attack.invalid TRUE / FALSE 0 name67 could-be-large-67 +attack.invalid TRUE / FALSE 0 name68 could-be-large-68 +attack.invalid TRUE / FALSE 0 name69 could-be-large-69 +attack.invalid TRUE / FALSE 0 name70 could-be-large-70 +attack.invalid TRUE / FALSE 0 name71 could-be-large-71 +attack.invalid TRUE / FALSE 0 name72 could-be-large-72 +attack.invalid TRUE / FALSE 0 name73 could-be-large-73 +attack.invalid TRUE / FALSE 0 name74 could-be-large-74 +attack.invalid TRUE / FALSE 0 name75 could-be-large-75 +attack.invalid TRUE / FALSE 0 name76 could-be-large-76 +attack.invalid TRUE / FALSE 0 name77 could-be-large-77 +attack.invalid TRUE / FALSE 0 name78 could-be-large-78 +attack.invalid TRUE / FALSE 0 name79 could-be-large-79 +attack.invalid TRUE / FALSE 0 name80 could-be-large-80 +attack.invalid TRUE / FALSE 0 name81 could-be-large-81 +attack.invalid TRUE / FALSE 0 name82 could-be-large-82 +attack.invalid TRUE / FALSE 0 name83 could-be-large-83 +attack.invalid TRUE / FALSE 0 name84 could-be-large-84 +attack.invalid TRUE / FALSE 0 name85 could-be-large-85 +attack.invalid TRUE / FALSE 0 name86 could-be-large-86 +attack.invalid TRUE / FALSE 0 name87 could-be-large-87 +attack.invalid TRUE / FALSE 0 name88 could-be-large-88 +attack.invalid TRUE / FALSE 0 name89 could-be-large-89 +attack.invalid TRUE / FALSE 0 name90 could-be-large-90 +attack.invalid TRUE / FALSE 0 name91 could-be-large-91 +attack.invalid TRUE / FALSE 0 name92 could-be-large-92 +attack.invalid TRUE / FALSE 0 name93 could-be-large-93 +attack.invalid TRUE / FALSE 0 name94 could-be-large-94 +attack.invalid TRUE / FALSE 0 name95 could-be-large-95 +attack.invalid TRUE / FALSE 0 name96 could-be-large-96 +attack.invalid TRUE / FALSE 0 name97 could-be-large-97 +attack.invalid TRUE / FALSE 0 name98 could-be-large-98 +attack.invalid TRUE / FALSE 0 name99 could-be-large-99 +attack.invalid TRUE / FALSE 0 name100 could-be-large-100 +attack.invalid TRUE / FALSE 0 name101 could-be-large-101 +attack.invalid TRUE / FALSE 0 name102 could-be-large-102 +attack.invalid TRUE / FALSE 0 name103 could-be-large-103 +attack.invalid TRUE / FALSE 0 name104 could-be-large-104 +attack.invalid TRUE / FALSE 0 name105 could-be-large-105 +attack.invalid TRUE / FALSE 0 name106 could-be-large-106 +attack.invalid TRUE / FALSE 0 name107 could-be-large-107 +attack.invalid TRUE / FALSE 0 name108 could-be-large-108 +attack.invalid TRUE / FALSE 0 name109 could-be-large-109 +attack.invalid TRUE / FALSE 0 name110 could-be-large-110 +attack.invalid TRUE / FALSE 0 name111 could-be-large-111 +attack.invalid TRUE / FALSE 0 name112 could-be-large-112 +attack.invalid TRUE / FALSE 0 name113 could-be-large-113 +attack.invalid TRUE / FALSE 0 name114 could-be-large-114 +attack.invalid TRUE / FALSE 0 name115 could-be-large-115 +attack.invalid TRUE / FALSE 0 name116 could-be-large-116 +attack.invalid TRUE / FALSE 0 name117 could-be-large-117 +attack.invalid TRUE / FALSE 0 name118 could-be-large-118 +attack.invalid TRUE / FALSE 0 name119 could-be-large-119 +attack.invalid TRUE / FALSE 0 name120 could-be-large-120 +attack.invalid TRUE / FALSE 0 name121 could-be-large-121 +attack.invalid TRUE / FALSE 0 name122 could-be-large-122 +attack.invalid TRUE / FALSE 0 name123 could-be-large-123 +attack.invalid TRUE / FALSE 0 name124 could-be-large-124 +attack.invalid TRUE / FALSE 0 name125 could-be-large-125 +attack.invalid TRUE / FALSE 0 name126 could-be-large-126 +attack.invalid TRUE / FALSE 0 name127 could-be-large-127 +attack.invalid TRUE / FALSE 0 name128 could-be-large-128 +attack.invalid TRUE / FALSE 0 name129 could-be-large-129 +attack.invalid TRUE / FALSE 0 name130 could-be-large-130 +attack.invalid TRUE / FALSE 0 name131 could-be-large-131 +attack.invalid TRUE / FALSE 0 name132 could-be-large-132 +attack.invalid TRUE / FALSE 0 name133 could-be-large-133 +attack.invalid TRUE / FALSE 0 name134 could-be-large-134 +attack.invalid TRUE / FALSE 0 name135 could-be-large-135 +attack.invalid TRUE / FALSE 0 name136 could-be-large-136 +attack.invalid TRUE / FALSE 0 name137 could-be-large-137 +attack.invalid TRUE / FALSE 0 name138 could-be-large-138 +attack.invalid TRUE / FALSE 0 name139 could-be-large-139 +attack.invalid TRUE / FALSE 0 name140 could-be-large-140 +attack.invalid TRUE / FALSE 0 name141 could-be-large-141 +attack.invalid TRUE / FALSE 0 name142 could-be-large-142 +attack.invalid TRUE / FALSE 0 name143 could-be-large-143 +attack.invalid TRUE / FALSE 0 name144 could-be-large-144 +attack.invalid TRUE / FALSE 0 name145 could-be-large-145 +attack.invalid TRUE / FALSE 0 name146 could-be-large-146 +attack.invalid TRUE / FALSE 0 name147 could-be-large-147 +attack.invalid TRUE / FALSE 0 name148 could-be-large-148 +attack.invalid TRUE / FALSE 0 name149 could-be-large-149 +attack.invalid TRUE / FALSE 0 name150 could-be-large-150 +attack.invalid TRUE / FALSE 0 name151 could-be-large-151 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /a/b/%TESTNUMBER HTTP/1.1
+Host: attack.invalid:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+Cookie: name150=could-be-large-150; name149=could-be-large-149; name148=could-be-large-148; name147=could-be-large-147; name146=could-be-large-146; name145=could-be-large-145; name144=could-be-large-144; name143=could-be-large-143; name142=could-be-large-142; name141=could-be-large-141; name140=could-be-large-140; name139=could-be-large-139; name138=could-be-large-138; name137=could-be-large-137; name136=could-be-large-136; name135=could-be-large-135; name134=could-be-large-134; name133=could-be-large-133; name132=could-be-large-132; name131=could-be-large-131; name130=could-be-large-130; name129=could-be-large-129; name128=could-be-large-128; name127=could-be-large-127; name126=could-be-large-126; name125=could-be-large-125; name124=could-be-large-124; name123=could-be-large-123; name122=could-be-large-122; name121=could-be-large-121; name120=could-be-large-120; name119=could-be-large-119; name118=could-be-large-118; name117=could-be-large-117; name116=could-be-large-116; name115=could-be-large-115; name114=could-be-large-114; name113=could-be-large-113; name112=could-be-large-112; name111=could-be-large-111; name110=could-be-large-110; name109=could-be-large-109; name108=could-be-large-108; name107=could-be-large-107; name106=could-be-large-106; name105=could-be-large-105; name104=could-be-large-104; name103=could-be-large-103; name102=could-be-large-102; name101=could-be-large-101; name100=could-be-large-100; name99=could-be-large-99; name98=could-be-large-98; name97=could-be-large-97; name96=could-be-large-96; name95=could-be-large-95; name94=could-be-large-94; name93=could-be-large-93; name92=could-be-large-92; name91=could-be-large-91; name90=could-be-large-90; name89=could-be-large-89; name88=could-be-large-88; name87=could-be-large-87; name86=could-be-large-86; name85=could-be-large-85; name84=could-be-large-84; name83=could-be-large-83; name82=could-be-large-82; name81=could-be-large-81; name80=could-be-large-80; name79=could-be-large-79; name78=could-be-large-78; name77=could-be-large-77; name76=could-be-large-76; name75=could-be-large-75; name74=could-be-large-74; name73=could-be-large-73; name72=could-be-large-72; name71=could-be-large-71; name70=could-be-large-70; name69=could-be-large-69; name68=could-be-large-68; name67=could-be-large-67; name66=could-be-large-66; name65=could-be-large-65; name64=could-be-large-64; name63=could-be-large-63; name62=could-be-large-62; name61=could-be-large-61; name60=could-be-large-60; name59=could-be-large-59; name58=could-be-large-58; name57=could-be-large-57; name56=could-be-large-56; name55=could-be-large-55; name54=could-be-large-54; name53=could-be-large-53; name52=could-be-large-52; name51=could-be-large-51; name50=could-be-large-50; name49=could-be-large-49; name48=could-be-large-48; name47=could-be-large-47; name46=could-be-large-46; name45=could-be-large-45; name44=could-be-large-44; name43=could-be-large-43; name42=could-be-large-42; name41=could-be-large-41; name40=could-be-large-40; name39=could-be-large-39; name38=could-be-large-38; name37=could-be-large-37; name36=could-be-large-36; name35=could-be-large-35; name34=could-be-large-34; name33=could-be-large-33; name32=could-be-large-32; name31=could-be-large-31; name30=could-be-large-30; name29=could-be-large-29; name28=could-be-large-28; name27=could-be-large-27; name26=could-be-large-26; name25=could-be-large-25; name24=could-be-large-24; name23=could-be-large-23; name22=could-be-large-22; name21=could-be-large-21; name20=could-be-large-20; name19=could-be-large-19; name18=could-be-large-18; name17=could-be-large-17; name16=could-be-large-16; name15=could-be-large-15; name14=could-be-large-14; name13=could-be-large-13; name12=could-be-large-12; name11=could-be-large-11; name10=could-be-large-10; name9=could-be-large-9; name8=could-be-large-8; name7=could-be-large-7; name6=could-be-large-6; name5=could-be-large-5; name4=could-be-large-4; name3=could-be-large-3; name2=could-be-large-2; name1=could-be-large-1
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test443 b/tests/data/test443 new file mode 100644 index 000000000..f984e7397 --- /dev/null +++ b/tests/data/test443 @@ -0,0 +1,79 @@ +<testcase> +# perl: +# +#for(1 .. 20) { +# print join("\t", +# "attack.invalid", "TRUE", "/", "FALSE", "0", +# "huge-$_", ('a' x 500)."-$_")."\n"; +#} +# +<info> +<keywords> +HTTP +cookies +--resolve +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<name> +Cookie header in request no longer than 8K +</name> +<command> +http://attack.invalid:%HTTPPORT/a/b/%TESTNUMBER -b log/cookie%TESTNUMBER --resolve attack.invalid:%HTTPPORT:%HOSTIP -L +</command> +<file name="log/cookie%TESTNUMBER" mode="text"> +attack.invalid TRUE / FALSE 0 huge-1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-1 +attack.invalid TRUE / FALSE 0 huge-2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-2 +attack.invalid TRUE / FALSE 0 huge-3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-3 +attack.invalid TRUE / FALSE 0 huge-4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-4 +attack.invalid TRUE / FALSE 0 huge-5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-5 +attack.invalid TRUE / FALSE 0 huge-6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-6 +attack.invalid TRUE / FALSE 0 huge-7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-7 +attack.invalid TRUE / FALSE 0 huge-8 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-8 +attack.invalid TRUE / FALSE 0 huge-9 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-9 +attack.invalid TRUE / FALSE 0 huge-10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-10 +attack.invalid TRUE / FALSE 0 huge-11 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-11 +attack.invalid TRUE / FALSE 0 huge-12 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-12 +attack.invalid TRUE / FALSE 0 huge-13 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-13 +attack.invalid TRUE / FALSE 0 huge-14 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-14 +attack.invalid TRUE / FALSE 0 huge-15 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-15 +attack.invalid TRUE / FALSE 0 huge-16 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-16 +attack.invalid TRUE / FALSE 0 huge-17 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-17 +attack.invalid TRUE / FALSE 0 huge-18 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-18 +attack.invalid TRUE / FALSE 0 huge-19 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-19 +attack.invalid TRUE / FALSE 0 huge-20 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-20 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /a/b/%TESTNUMBER HTTP/1.1
+Host: attack.invalid:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+Cookie: huge-20=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-20; huge-19=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-19; huge-18=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-18; huge-17=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-17; huge-16=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-16; huge-15=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-15; huge-14=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-14; huge-13=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-13; huge-12=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-12; huge-11=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-11; huge-10=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-10; huge-9=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-9; huge-8=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-8; huge-7=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-7; huge-6=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-6
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test444 b/tests/data/test444 new file mode 100644 index 000000000..89d671c72 --- /dev/null +++ b/tests/data/test444 @@ -0,0 +1,190 @@ +<testcase> +# perl: +# +#for(1 .. 200) { +# +#} +# +<info> +<keywords> +HTTP +cookies +--resolve +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Set-Cookie: cookie-1=yes; +Set-Cookie: cookie-2=yes; +Set-Cookie: cookie-3=yes; +Set-Cookie: cookie-4=yes; +Set-Cookie: cookie-5=yes; +Set-Cookie: cookie-6=yes; +Set-Cookie: cookie-7=yes; +Set-Cookie: cookie-8=yes; +Set-Cookie: cookie-9=yes; +Set-Cookie: cookie-10=yes; +Set-Cookie: cookie-11=yes; +Set-Cookie: cookie-12=yes; +Set-Cookie: cookie-13=yes; +Set-Cookie: cookie-14=yes; +Set-Cookie: cookie-15=yes; +Set-Cookie: cookie-16=yes; +Set-Cookie: cookie-17=yes; +Set-Cookie: cookie-18=yes; +Set-Cookie: cookie-19=yes; +Set-Cookie: cookie-20=yes; +Set-Cookie: cookie-21=yes; +Set-Cookie: cookie-22=yes; +Set-Cookie: cookie-23=yes; +Set-Cookie: cookie-24=yes; +Set-Cookie: cookie-25=yes; +Set-Cookie: cookie-26=yes; +Set-Cookie: cookie-27=yes; +Set-Cookie: cookie-28=yes; +Set-Cookie: cookie-29=yes; +Set-Cookie: cookie-30=yes; +Set-Cookie: cookie-31=yes; +Set-Cookie: cookie-32=yes; +Set-Cookie: cookie-33=yes; +Set-Cookie: cookie-34=yes; +Set-Cookie: cookie-35=yes; +Set-Cookie: cookie-36=yes; +Set-Cookie: cookie-37=yes; +Set-Cookie: cookie-38=yes; +Set-Cookie: cookie-39=yes; +Set-Cookie: cookie-40=yes; +Set-Cookie: cookie-41=yes; +Set-Cookie: cookie-42=yes; +Set-Cookie: cookie-43=yes; +Set-Cookie: cookie-44=yes; +Set-Cookie: cookie-45=yes; +Set-Cookie: cookie-46=yes; +Set-Cookie: cookie-47=yes; +Set-Cookie: cookie-48=yes; +Set-Cookie: cookie-49=yes; +Set-Cookie: cookie-50=yes; +Set-Cookie: cookie-51=yes; +Set-Cookie: cookie-52=yes; +Set-Cookie: cookie-53=yes; +Set-Cookie: cookie-54=yes; +Set-Cookie: cookie-55=yes; +Set-Cookie: cookie-56=yes; +Set-Cookie: cookie-57=yes; +Set-Cookie: cookie-58=yes; +Set-Cookie: cookie-59=yes; +Set-Cookie: cookie-60=yes; +Set-Cookie: cookie-61=yes; +Set-Cookie: cookie-62=yes; +Set-Cookie: cookie-63=yes; +Set-Cookie: cookie-64=yes; +Set-Cookie: cookie-65=yes; +Set-Cookie: cookie-66=yes; +Set-Cookie: cookie-67=yes; +Set-Cookie: cookie-68=yes; +Set-Cookie: cookie-69=yes; +Set-Cookie: cookie-70=yes; +Set-Cookie: cookie-71=yes; +Set-Cookie: cookie-72=yes; +Set-Cookie: cookie-73=yes; +Set-Cookie: cookie-74=yes; +Set-Cookie: cookie-75=yes; +Set-Cookie: cookie-76=yes; +Set-Cookie: cookie-77=yes; +Set-Cookie: cookie-78=yes; +Set-Cookie: cookie-79=yes; +Set-Cookie: cookie-80=yes; + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<name> +Many Set-Cookie response headers +</name> +<command> +http://attack.invalid:%HTTPPORT/a/b/%TESTNUMBER -c log/cookie%TESTNUMBER --resolve attack.invalid:%HTTPPORT:%HOSTIP +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /a/b/%TESTNUMBER HTTP/1.1
+Host: attack.invalid:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<file name="log/cookie%TESTNUMBER" mode="text"> +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +attack.invalid FALSE /a/b/ FALSE 0 cookie-50 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-49 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-48 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-47 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-46 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-45 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-44 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-43 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-42 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-41 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-40 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-39 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-38 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-37 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-36 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-35 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-34 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-33 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-32 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-31 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-30 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-29 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-28 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-27 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-26 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-25 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-24 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-23 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-22 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-21 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-20 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-19 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-18 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-17 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-16 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-15 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-14 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-13 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-12 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-11 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-10 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-9 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-8 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-7 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-6 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-5 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-4 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-3 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-2 yes +attack.invalid FALSE /a/b/ FALSE 0 cookie-1 yes +</file> +</verify> +</testcase> diff --git a/tests/data/test445 b/tests/data/test445 new file mode 100644 index 000000000..0406c0f9a --- /dev/null +++ b/tests/data/test445 @@ -0,0 +1,61 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +</keywords> +</info> + +# +# Server-side +<reply> +<connect> +HTTP/1.1 503 no just no +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Accept-Ranges: bytes +Content-Length: 6 +Connection: close + +-foo- +</connect> +</reply> + +# +# Client-side +<client> +<features> +gopher +dict +http +ftp +imap +ldap +mqtt +pop3 +rtsp +scp +sftp +smb +smtp +</features> +<server> +http-proxy +</server> + <name> +Refuse tunneling protocols through HTTP proxy + </name> + <command> +-x http://%HOSTIP:%PROXYPORT/%TESTNUMBER -p gopher://127.0.0.1 dict://127.0.0.1 http://moo https://example telnet://another ftp://yes ftps://again imap://more ldap://perhaps mqtt://yes pop3://mail rtsp://harder scp://copy sftp://files smb://wird smtp://send +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +# refused in the CONNECT +<errorcode> +56 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test493 b/tests/data/test493 index db053d105..f0c41105b 100644 --- a/tests/data/test493 +++ b/tests/data/test493 @@ -2,6 +2,7 @@ <info> <keywords> HTTP +HTTP proxy HSTS url_effective </keywords> diff --git a/tests/data/test495 b/tests/data/test495 new file mode 100644 index 000000000..deba48ae1 --- /dev/null +++ b/tests/data/test495 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<server> +http +</server> +<name> +user+password in URL with optional netrc +</name> +# the key is the URL encoded user, which needs to be sent encoded in the +# Authorization: header +<command> +http://foo%40bar:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --netrc-optional +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic Zm9vQGJhcjpzZWNyZXQ=
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test496 b/tests/data/test496 new file mode 100644 index 000000000..19050f377 --- /dev/null +++ b/tests/data/test496 @@ -0,0 +1,36 @@ +<testcase> +<info> +<keywords> +curl tool +cmdline +parallel +</keywords> +</info> + +# +# Server-side +<reply> +</reply> + +# +# Client-side +<client> +<server> +none +</server> +<name> +parallel upload missing file +</name> + <command> +0 -Z -Tz +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<errorcode> +26 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test511 b/tests/data/test511 index 994907a9b..6bcf25de5 100644 --- a/tests/data/test511 +++ b/tests/data/test511 @@ -44,6 +44,8 @@ USER anonymous PASS ftp@example.com
PWD
MDTM %TESTNUMBER
+TYPE I
+SIZE %TESTNUMBER
QUIT
</protocol> </verify> diff --git a/tests/data/test516 b/tests/data/test516 index c441cfb2f..5f7d210a5 100644 --- a/tests/data/test516 +++ b/tests/data/test516 @@ -21,6 +21,9 @@ OK # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test547 b/tests/data/test547 index 93ee7903c..de0780081 100644 --- a/tests/data/test547 +++ b/tests/data/test547 @@ -6,6 +6,7 @@ HTTP POST POST callback HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> # Server-side @@ -78,24 +79,14 @@ lib%TESTNUMBER NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy auth NTLM with POST data from read callback - </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> +</name> +<command> http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -119,7 +110,7 @@ Content-Type: application/x-www-form-urlencoded POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test548 b/tests/data/test548 index 72e816bbb..98b43642b 100644 --- a/tests/data/test548 +++ b/tests/data/test548 @@ -5,6 +5,7 @@ HTTP HTTP POST HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> @@ -78,24 +79,14 @@ lib%TESTNUMBER NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS - </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> +</name> +<command> http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -119,7 +110,7 @@ Content-Type: application/x-www-form-urlencoded POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test554 b/tests/data/test554 index 8488be60b..cee616427 100644 --- a/tests/data/test554 +++ b/tests/data/test554 @@ -38,6 +38,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test555 b/tests/data/test555 index b19949fd2..f3633f0b1 100644 --- a/tests/data/test555 +++ b/tests/data/test555 @@ -10,6 +10,7 @@ POST callback HTTP proxy HTTP proxy NTLM auth multi +NTLM </keywords> </info> @@ -83,24 +84,14 @@ lib%TESTNUMBER NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy auth NTLM with POST data from read callback multi-if - </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> +</name> +<command> http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -124,7 +115,7 @@ Content-Type: application/x-www-form-urlencoded POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 36
diff --git a/tests/data/test58 b/tests/data/test58 index 01d7189a8..75765b224 100644 --- a/tests/data/test58 +++ b/tests/data/test58 @@ -36,7 +36,7 @@ a few bytes # Verify data after the test has been "shot" <verify> <protocol> -PUT /we/want/%TESTNUMBERte%5B%5Dst.txt HTTP/1.1
+PUT /we/want/%TESTNUMBERte%5b%5dst.txt HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test584 b/tests/data/test584 index fb234440b..7a7d2499c 100644 --- a/tests/data/test584 +++ b/tests/data/test584 @@ -36,6 +36,9 @@ OK # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test587 b/tests/data/test587 index a40e4bf80..6af7d9936 100644 --- a/tests/data/test587 +++ b/tests/data/test587 @@ -16,6 +16,9 @@ flaky # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test589 b/tests/data/test589 index 02fe54315..6f4597877 100644 --- a/tests/data/test589 +++ b/tests/data/test589 @@ -22,6 +22,9 @@ OK # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test590 b/tests/data/test590 index 045b03718..00ef1b190 100644 --- a/tests/data/test590 +++ b/tests/data/test590 @@ -6,6 +6,7 @@ HTTP POST POST callback HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> # Server-side @@ -76,24 +77,14 @@ lib%TESTNUMBER NTLM SSL !SSPI -debug proxy </features> - <name> +<name> HTTP proxy offers Negotiate+NTLM, use only NTLM - </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> +</name> +<command> http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -113,7 +104,7 @@ Proxy-Connection: Keep-Alive GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAgACAHAAAAAIAAgAcgAAAAAAAAAAAAAAhoIBAAQt1KW5CgG4YdWWcfXyfXBz1ZMCzYp37xYjBiAizmw58O6eQS7yR66eqYGWeSwl9W1lY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAgACAHAAAAALAAsAcgAAAAAAAAAAAAAAhoIBAAQt1KW5CgG4YdWWcfXyfXBz1ZMCzYp37xYjBiAizmw58O6eQS7yR66eqYGWeSwl9W1lV09SS1NUQVRJT04=
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test643 b/tests/data/test643 index 65bb99059..ca6c5416a 100644 --- a/tests/data/test643 +++ b/tests/data/test643 @@ -39,6 +39,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test644 b/tests/data/test644 new file mode 100644 index 000000000..c067d034c --- /dev/null +++ b/tests/data/test644 @@ -0,0 +1,85 @@ +<testcase> +<info> +<keywords> +HTTP +xattr +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 301 OK +Date: Tue, 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: fake/data +Funny-head: yesyes +Location: data/%TESTNUMBER0002.txt?coolsite=yes + +-foo- +</data> +<data2 nocheck="yes"> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/real +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- +</data2> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<features> +debug +xattr +</features> +# simulate the xattr operations +<setenv> +CURL_FAKE_XATTR=1 +</setenv> +<name> +--xattr with redirect +</name> +<command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --xattr -L -o log/out%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<stdout mode="text"> +user.mime_type => text/html +user.xdg.origin.url => http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</stdout> +</verify> +</testcase> diff --git a/tests/data/test645 b/tests/data/test645 index d5ce825bb..523097222 100644 --- a/tests/data/test645 +++ b/tests/data/test645 @@ -39,6 +39,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test646 b/tests/data/test646 index 4c4297c92..3418fa24c 100644 --- a/tests/data/test646 +++ b/tests/data/test646 @@ -14,6 +14,9 @@ MULTIPART # # Client-side <client> +<features> +Mime +</features> <server> smtp </server> diff --git a/tests/data/test647 b/tests/data/test647 index a609ad97d..90d44c2c4 100644 --- a/tests/data/test647 +++ b/tests/data/test647 @@ -15,6 +15,9 @@ MULTIPART # # Client-side <client> +<features> +Mime +</features> <server> imap </server> diff --git a/tests/data/test648 b/tests/data/test648 index 3683530d7..fe32cd5ee 100644 --- a/tests/data/test648 +++ b/tests/data/test648 @@ -14,6 +14,9 @@ MULTIPART # # Client-side <client> +<features> +Mime +</features> <server> smtp </server> diff --git a/tests/data/test649 b/tests/data/test649 index 0f759f0de..668cdc75a 100644 --- a/tests/data/test649 +++ b/tests/data/test649 @@ -14,6 +14,9 @@ MULTIPART # # Client-side <client> +<features> +Mime +</features> <server> smtp </server> diff --git a/tests/data/test650 b/tests/data/test650 index 0e4c5d3c2..e2626b752 100644 --- a/tests/data/test650 +++ b/tests/data/test650 @@ -23,6 +23,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test651 b/tests/data/test651 index be2cbe405..38f21c3ad 100644 --- a/tests/data/test651 +++ b/tests/data/test651 @@ -23,6 +23,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test652 b/tests/data/test652 index f4b997216..d3ff7a0f7 100644 --- a/tests/data/test652 +++ b/tests/data/test652 @@ -14,6 +14,9 @@ MIME # # Client-side <client> +<features> +Mime +</features> <server> smtp </server> diff --git a/tests/data/test653 b/tests/data/test653 index db62c985b..fa018be25 100644 --- a/tests/data/test653 +++ b/tests/data/test653 @@ -39,6 +39,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test654 b/tests/data/test654 index d8da0da1d..5716a0ba6 100644 --- a/tests/data/test654 +++ b/tests/data/test654 @@ -39,6 +39,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test666 b/tests/data/test666 index d8b3356bc..14fbe4933 100644 --- a/tests/data/test666 +++ b/tests/data/test666 @@ -32,6 +32,9 @@ OK # # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test667 b/tests/data/test667 index e54e15b0e..754645394 100644 --- a/tests/data/test667 +++ b/tests/data/test667 @@ -32,6 +32,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test668 b/tests/data/test668 index 0606e3707..c1a0f8f19 100644 --- a/tests/data/test668 +++ b/tests/data/test668 @@ -32,6 +32,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test669 b/tests/data/test669 index 20c02a638..7f1be86b3 100644 --- a/tests/data/test669 +++ b/tests/data/test669 @@ -21,6 +21,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test67 b/tests/data/test67 index 0e50450b4..b2790099d 100644 --- a/tests/data/test67 +++ b/tests/data/test67 @@ -4,6 +4,7 @@ HTTP HTTP GET HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -58,26 +59,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP with NTLM authorization - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -91,7 +82,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test670 b/tests/data/test670 index 4d1056c55..b7b5a90cb 100644 --- a/tests/data/test670 +++ b/tests/data/test670 @@ -32,6 +32,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test671 b/tests/data/test671 index b6550aa3d..110038298 100644 --- a/tests/data/test671 +++ b/tests/data/test671 @@ -32,6 +32,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test672 b/tests/data/test672 index 43d183e2d..d7f1cccb0 100644 --- a/tests/data/test672 +++ b/tests/data/test672 @@ -32,6 +32,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test673 b/tests/data/test673 index e263810fd..0fd3f3732 100644 --- a/tests/data/test673 +++ b/tests/data/test673 @@ -32,6 +32,9 @@ hello # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test675 b/tests/data/test675 index b0933bede..fdc5a7631 100644 --- a/tests/data/test675 +++ b/tests/data/test675 @@ -12,7 +12,7 @@ HTTP Basic auth HTTP/1.1 200 OK swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Type: text/html
-Content-Length: 26 +Content-Length: 26
the content would go here </data> diff --git a/tests/data/test679 b/tests/data/test679 new file mode 100644 index 000000000..53b20c6e0 --- /dev/null +++ b/tests/data/test679 @@ -0,0 +1,56 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 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-side +<client> +<server> +http +</server> + <name> +netrc with quoted password + </name> + <command> +--netrc-optional --netrc-file log/netrc%TESTNUMBER http://%HOSTIP:%HTTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +machine %HOSTIP login user1 password "with spaces and \"\n\r\t\a" +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET / HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjE6d2l0aCBzcGFjZXMgYW5kICIKDQlh
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test68 b/tests/data/test68 index cd3378b5a..b6d8f67cb 100644 --- a/tests/data/test68 +++ b/tests/data/test68 @@ -4,6 +4,7 @@ HTTP HTTP GET HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -57,26 +58,16 @@ Wrong password dude. Get it fixed and return. NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP with NTLM authorization and wrong password - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -90,7 +81,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test680 b/tests/data/test680 new file mode 100644 index 000000000..23e194daa --- /dev/null +++ b/tests/data/test680 @@ -0,0 +1,40 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> +# +# Server-side +<reply> +</reply> + +# +# Client-side +<client> +<server> +none +</server> +<features> +http +</features> + <name> +netrc with quoted password but missing end quote + </name> + <command> +--netrc --netrc-file log/netrc%TESTNUMBER http://user1@http.example/ +</command> +<file name="log/netrc%TESTNUMBER" > +machine %HOSTIP login user1 password "with spaces and \"\n\r\t\a +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<errorcode> +26 +</errorcode> +</verify> +</testcase> diff --git a/tests/data/test681 b/tests/data/test681 new file mode 100644 index 000000000..d98393ddb --- /dev/null +++ b/tests/data/test681 @@ -0,0 +1,51 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> + +# +# Server-side +<reply> +<data nocheck="yes"> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Content-Length: 6 +Connection: close +Funny-head: yesyes + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<name> +--remote-name-all with --no-remote-name +</name> +<command option="no-include"> +--remote-name-all --no-remote-name --output-dir log http://%HOSTIP:%HTTPPORT/%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +<stdout> +-foo- +</stdout> +</verify> +</testcase> diff --git a/tests/data/test682 b/tests/data/test682 new file mode 100644 index 000000000..dfe076e5e --- /dev/null +++ b/tests/data/test682 @@ -0,0 +1,53 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Fri, 05 Aug 2022 10:09:00 GMT +Server: test-server/fake +Content-Type: text/plain +Content-Length: 6 +Connection: close + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +netrc with multiple logins - pick first + </name> + <command> +--netrc-optional --netrc-file log/netrc%TESTNUMBER http://user1@%HOSTIP:%HTTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +machine %HOSTIP login user1 password passwd1 +machine %HOSTIP login user2 password passwd2 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET / HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic %b64[user1:passwd1]b64%
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test683 b/tests/data/test683 new file mode 100644 index 000000000..cf6ea4473 --- /dev/null +++ b/tests/data/test683 @@ -0,0 +1,53 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Fri, 05 Aug 2022 10:09:00 GMT +Server: test-server/fake +Content-Type: text/plain +Content-Length: 6 +Connection: close + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +netrc with multiple logins - pick second + </name> + <command> +--netrc-optional --netrc-file log/netrc%TESTNUMBER http://user2@%HOSTIP:%HTTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +machine %HOSTIP login user1 password passwd1 +machine %HOSTIP login user2 password passwd2 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET / HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic %b64[user2:passwd2]b64%
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test684 b/tests/data/test684 new file mode 100644 index 000000000..d7391a131 --- /dev/null +++ b/tests/data/test684 @@ -0,0 +1,52 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Fri, 05 Aug 2022 10:09:00 GMT +Server: test-server/fake +Content-Type: text/plain +Content-Length: 6 +Connection: close + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +netrc with no login + </name> + <command> +--netrc-optional --netrc-file log/netrc%TESTNUMBER http://%HOSTIP:%HTTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +machine %HOSTIP password 5up3r53cr37 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET / HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic %b64[:5up3r53cr37]b64%
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test685 b/tests/data/test685 new file mode 100644 index 000000000..ba520bd54 --- /dev/null +++ b/tests/data/test685 @@ -0,0 +1,52 @@ +<testcase> +<info> +<keywords> +HTTP +netrc +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Fri, 05 Aug 2022 10:09:00 GMT +Server: test-server/fake +Content-Type: text/plain +Content-Length: 6 +Connection: close + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +netrc with no login - provided user + </name> + <command> +--netrc-optional --netrc-file log/netrc%TESTNUMBER http://user@%HOSTIP:%HTTPPORT/ +</command> +<file name="log/netrc%TESTNUMBER" > +machine %HOSTIP password 5up3r53cr37 +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +</protocol> +GET / HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic %b64[user:5up3r53cr37]b64%
+User-Agent: curl/%VERSION
+Accept: */*
+
+</verify> +</testcase> diff --git a/tests/data/test69 b/tests/data/test69 index edaa3d8cf..1df70f3d9 100644 --- a/tests/data/test69 +++ b/tests/data/test69 @@ -4,6 +4,7 @@ HTTP HTTP GET HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -74,26 +75,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP with NTLM, Basic or Wild-and-crazy authorization - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -112,7 +103,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test700 b/tests/data/test700 index 23e003766..e2a0d3320 100644 --- a/tests/data/test700 +++ b/tests/data/test700 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +proxy +</features> <server> http socks4 diff --git a/tests/data/test701 b/tests/data/test701 index db22d668e..f4cd7f14b 100644 --- a/tests/data/test701 +++ b/tests/data/test701 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +proxy +</features> <server> http socks5 diff --git a/tests/data/test702 b/tests/data/test702 index dd84ffe26..4e06f8889 100644 --- a/tests/data/test702 +++ b/tests/data/test702 @@ -20,6 +20,9 @@ response 91 # Client-side <client> +<features> +proxy +</features> <server> socks4 </server> diff --git a/tests/data/test706 b/tests/data/test706 index b0531e788..873f12989 100644 --- a/tests/data/test706 +++ b/tests/data/test706 @@ -31,6 +31,9 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr # # Client-side <client> +<features> +proxy +</features> <server> ftp socks4 diff --git a/tests/data/test707 b/tests/data/test707 index d4c3ab7c6..e58919345 100644 --- a/tests/data/test707 +++ b/tests/data/test707 @@ -31,6 +31,9 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr # # Client-side <client> +<features> +proxy +</features> <server> ftp socks5 diff --git a/tests/data/test708 b/tests/data/test708 index ff5b91444..72f4dcec8 100644 --- a/tests/data/test708 +++ b/tests/data/test708 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +proxy +</features> <server> http socks4 diff --git a/tests/data/test709 b/tests/data/test709 index 9d43c7521..d6380aff2 100644 --- a/tests/data/test709 +++ b/tests/data/test709 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +proxy +</features> <server> http socks5 diff --git a/tests/data/test71 b/tests/data/test71 index 7f8b049b2..56c36e1b6 100644 --- a/tests/data/test71 +++ b/tests/data/test71 @@ -21,6 +21,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test710 b/tests/data/test710 index 5302022fe..6400eefb3 100644 --- a/tests/data/test710 +++ b/tests/data/test710 @@ -29,6 +29,9 @@ Funny-head: yesyes # # Client-side <client> +<features> +proxy +</features> <server> http socks5 diff --git a/tests/data/test711 b/tests/data/test711 index a70631a08..e5f1c39fd 100644 --- a/tests/data/test711 +++ b/tests/data/test711 @@ -22,6 +22,9 @@ silly content # # Client-side <client> +<features> +proxy +</features> <server> ftp socks5 diff --git a/tests/data/test712 b/tests/data/test712 index 0c6a64338..dbdf1adbe 100644 --- a/tests/data/test712 +++ b/tests/data/test712 @@ -19,6 +19,9 @@ silly content # # Client-side <client> +<features> +proxy +</features> <server> ftp socks5 diff --git a/tests/data/test713 b/tests/data/test713 index 1803f8e9e..8c94a9cc1 100644 --- a/tests/data/test713 +++ b/tests/data/test713 @@ -20,6 +20,9 @@ silly content # # Client-side <client> +<features> +proxy +</features> <server> ftp socks5 diff --git a/tests/data/test714 b/tests/data/test714 index b405bcd96..1e042404e 100644 --- a/tests/data/test714 +++ b/tests/data/test714 @@ -35,6 +35,9 @@ silly content # # Client-side <client> +<features> +proxy +</features> <server> ftp http-proxy diff --git a/tests/data/test715 b/tests/data/test715 index 1bbceb790..d3d89d514 100644 --- a/tests/data/test715 +++ b/tests/data/test715 @@ -36,6 +36,9 @@ silly content # # Client-side <client> +<features> +proxy +</features> <server> ftp http-proxy diff --git a/tests/data/test718 b/tests/data/test718 index 6ab6c5a31..613647aa0 100644 --- a/tests/data/test718 +++ b/tests/data/test718 @@ -17,11 +17,13 @@ HTTP proxy Digest auth <connect> HTTP/1.1 407 Authorization Required to proxy me swsclose
Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
+
</connect> <datacheck> HTTP/1.1 407 Authorization Required to proxy me swsclose
Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
+
</datacheck> </reply> diff --git a/tests/data/test8 b/tests/data/test8 index a8548e6c2..fa44a5a6a 100644 --- a/tests/data/test8 +++ b/tests/data/test8 @@ -46,6 +46,36 @@ 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: cookie1=%hex[%01-junk]hex% +Set-Cookie: cookie2=%hex[%02-junk]hex% +Set-Cookie: cookie3=%hex[%03-junk]hex% +Set-Cookie: cookie4=%hex[%04-junk]hex% +Set-Cookie: cookie5=%hex[%05-junk]hex% +Set-Cookie: cookie6=%hex[%06-junk]hex% +Set-Cookie: cookie7=%hex[%07-junk]hex% +Set-Cookie: cookie8=%hex[%08-junk]hex% +Set-Cookie: cookie9=%hex[junk--%09]hex% +Set-Cookie: cookie11=%hex[%0b-junk]hex% +Set-Cookie: cookie12=%hex[%0c-junk]hex% +Set-Cookie: cookie14=%hex[%0e-junk]hex% +Set-Cookie: cookie15=%hex[%0f-junk]hex% +Set-Cookie: cookie16=%hex[%10-junk]hex% +Set-Cookie: cookie17=%hex[%11-junk]hex% +Set-Cookie: cookie18=%hex[%12-junk]hex% +Set-Cookie: cookie19=%hex[%13-junk]hex% +Set-Cookie: cookie20=%hex[%14-junk]hex% +Set-Cookie: cookie21=%hex[%15-junk]hex% +Set-Cookie: cookie22=%hex[%16-junk]hex% +Set-Cookie: cookie23=%hex[%17-junk]hex% +Set-Cookie: cookie24=%hex[%18-junk]hex% +Set-Cookie: cookie25=%hex[%19-junk]hex% +Set-Cookie: cookie26=%hex[%1a-junk]hex% +Set-Cookie: cookie27=%hex[%1b-junk]hex% +Set-Cookie: cookie28=%hex[%1c-junk]hex% +Set-Cookie: cookie29=%hex[%1d-junk]hex% +Set-Cookie: cookie30=%hex[%1e-junk]hex% +Set-Cookie: cookie31=%hex[%1f-junk]hex% +Set-Cookie: cookie31=%hex[%7f-junk]hex% </file> <precheck> @@ -60,7 +90,7 @@ GET /we/want/%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
-Cookie: name with space=is weird but; trailingspace=removed; cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes
+Cookie: name with space=is weird but; trailingspace=removed; cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes; cookie9=junk--
</protocol> </verify> diff --git a/tests/data/test81 b/tests/data/test81 index 1808bab18..f692f34f4 100644 --- a/tests/data/test81 +++ b/tests/data/test81 @@ -5,6 +5,7 @@ HTTP HTTP GET HTTP proxy HTTP proxy NTLM auth +NTLM </keywords> </info> @@ -57,27 +58,17 @@ Finally, this is the real page! NTLM SSL !SSPI -debug proxy </features> <server> http </server> - <name> +<name> HTTP with proxy using NTLM authorization - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT --proxy-ntlm </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -92,7 +83,7 @@ Proxy-Connection: Keep-Alive GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test822 b/tests/data/test822 index 257115ba4..61db77dc3 100644 --- a/tests/data/test822 +++ b/tests/data/test822 @@ -4,6 +4,7 @@ IMAP SASL SASL AUTH NTLM +NTLM </keywords> </info> @@ -14,7 +15,7 @@ SASL AUTH NTLM AUTH NTLM REPLY AUTHENTICATE + REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== -REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= A002 OK AUTHENTICATE completed +REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= A002 OK AUTHENTICATE completed </servercmd> <data> From: me@somewhere
@@ -37,23 +38,13 @@ imap NTLM SSL !SSPI -debug </features> - <name> +<name> IMAP NTLM authentication - </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> +</name> +<command> 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u testuser:testpass </command> -<precheck> -chkhostname curlhost -</precheck> </client> # @@ -63,7 +54,7 @@ chkhostname curlhost A001 CAPABILITY
A002 AUTHENTICATE NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
A003 SELECT %TESTNUMBER
A004 FETCH 1 BODY[]
A005 LOGOUT
diff --git a/tests/data/test827 b/tests/data/test827 index 79e449b79..493775381 100644 --- a/tests/data/test827 +++ b/tests/data/test827 @@ -5,6 +5,7 @@ IMAP SASL SASL AUTH NTLM SASL-IR +NTLM </keywords> </info> @@ -15,7 +16,7 @@ SASL-IR AUTH NTLM CAPA SASL-IR REPLY AUTHENTICATE + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== -REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= A002 OK AUTHENTICATE completed +REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= A002 OK AUTHENTICATE completed </servercmd> <data> From: me@somewhere
@@ -38,23 +39,13 @@ imap NTLM SSL !SSPI -debug </features> - <name> +<name> IMAP NTLM authentication with initial response - </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> +</name> +<command> 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u testuser:testpass </command> -<precheck> -chkhostname curlhost -</precheck> </client> # @@ -63,7 +54,7 @@ chkhostname curlhost <protocol> A001 CAPABILITY
A002 AUTHENTICATE NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
A003 SELECT %TESTNUMBER
A004 FETCH 1 BODY[]
A005 LOGOUT
diff --git a/tests/data/test852 b/tests/data/test852 index 8e608eb57..2234087ee 100644 --- a/tests/data/test852 +++ b/tests/data/test852 @@ -34,7 +34,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret # Verify data after the test has been "shot" <verify> <errorcode> -56 +8 </errorcode> <protocol> CAPA
diff --git a/tests/data/test855 b/tests/data/test855 index 24b1166c6..0ab1ab397 100644 --- a/tests/data/test855 +++ b/tests/data/test855 @@ -34,7 +34,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret # Verify data after the test has been "shot" <verify> <errorcode> -56 +8 </errorcode> <protocol> CAPA
diff --git a/tests/data/test868 b/tests/data/test868 index 9216608af..6807fa56f 100644 --- a/tests/data/test868 +++ b/tests/data/test868 @@ -6,6 +6,7 @@ SASL SASL AUTH NTLM RFC1734 RFC5034 +NTLM </keywords> </info> @@ -16,7 +17,7 @@ RFC5034 AUTH NTLM REPLY AUTH + REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= +OK Login successful +REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= +OK Login successful </servercmd> <data> From: me@somewhere
@@ -39,23 +40,13 @@ pop3 NTLM SSL !SSPI -debug </features> - <name> +<name> POP3 NTLM authentication - </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> +</name> +<command> pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass </command> -<precheck> -chkhostname curlhost -</precheck> </client> # @@ -65,7 +56,7 @@ chkhostname curlhost CAPA
AUTH NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
RETR %TESTNUMBER
QUIT
</protocol> diff --git a/tests/data/test873 b/tests/data/test873 index 67c810788..0f5f3be9b 100644 --- a/tests/data/test873 +++ b/tests/data/test873 @@ -7,6 +7,7 @@ SASL AUTH NTLM SASL-IR RFC1734 RFC5034 +NTLM </keywords> </info> @@ -16,7 +17,7 @@ RFC5034 <servercmd> AUTH NTLM REPLY AUTH + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== -REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= +OK Login successful +REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= +OK Login successful </servercmd> <data> From: me@somewhere
@@ -39,23 +40,13 @@ pop3 NTLM SSL !SSPI -debug </features> - <name> +<name> POP3 NTLM authentication with initial response - </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> +</name> +<command> pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass --sasl-ir </command> -<precheck> -chkhostname curlhost -</precheck> </client> # @@ -64,7 +55,7 @@ chkhostname curlhost <protocol> CAPA
AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
RETR %TESTNUMBER
QUIT
</protocol> diff --git a/tests/data/test89 b/tests/data/test89 index 6781e0479..fb621ae2b 100644 --- a/tests/data/test89 +++ b/tests/data/test89 @@ -5,6 +5,7 @@ HTTP HTTP GET HTTP NTLM auth followlocation +NTLM </keywords> </info> # Server-side @@ -91,26 +92,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP with NTLM and follow-location - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -124,7 +115,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
@@ -136,7 +127,7 @@ Accept: */* GET /you/%TESTNUMBER0010 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test898 b/tests/data/test898 new file mode 100644 index 000000000..33bcb2912 --- /dev/null +++ b/tests/data/test898 @@ -0,0 +1,94 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +--location +Authorization +Cookie +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 + +</data> +<data2> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Connection: close +Content-Type: text/html + +hey +</data2> + +<datacheck> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 + +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Connection: close +Content-Type: text/html + +hey +</datacheck> + +</reply> + +# +# Client-side +<client> +<features> +proxy +</features> +<server> +http +</server> + <name> +HTTP with custom auth and cookies redirected to HTTP on a diff port + </name> + <command> +-x http://%HOSTIP:%HTTPPORT http://firsthost.com -L -H "Authorization: Basic am9lOnNlY3JldA==" -H "Cookie: userpwd=am9lOnNlY3JldA==" +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET http://firsthost.com/ HTTP/1.1
+Host: firsthost.com
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+Authorization: Basic am9lOnNlY3JldA==
+Cookie: userpwd=am9lOnNlY3JldA==
+
+GET http://firsthost.com:9999/a/path/%TESTNUMBER0002 HTTP/1.1
+Host: firsthost.com:9999
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test9 b/tests/data/test9 index e3aa2b6af..fc53b7043 100644 --- a/tests/data/test9 +++ b/tests/data/test9 @@ -20,6 +20,9 @@ blablabla # Client-side <client> +<features> +Mime +</features> <server> http </server> diff --git a/tests/data/test90 b/tests/data/test90 index 9ca9972a4..b043ce043 100644 --- a/tests/data/test90 +++ b/tests/data/test90 @@ -6,6 +6,7 @@ HTTP GET HTTP NTLM auth --anyauth followlocation +NTLM </keywords> </info> # Server-side @@ -129,26 +130,16 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http </server> - <name> +<name> HTTP with NTLM via --anyauth, and then follow-location with NTLM again - </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> +</name> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth -L </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -167,7 +158,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
@@ -184,7 +175,7 @@ Accept: */* GET /you/%TESTNUMBER0010 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test906 b/tests/data/test906 index 9330d0aa3..863dce698 100644 --- a/tests/data/test906 +++ b/tests/data/test906 @@ -5,6 +5,7 @@ SMTP SASL SASL AUTH NTLM RFC4954 +NTLM </keywords> </info> @@ -15,7 +16,7 @@ RFC4954 AUTH NTLM REPLY AUTH 334 NTLM supported REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 334 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 235 Authenticated +REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= 235 Authenticated </servercmd> </reply> @@ -29,26 +30,16 @@ smtp NTLM SSL !SSPI -debug </features> - <name> +<name> SMTP NTLM authentication - </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> +</name> <stdin> mail body
</stdin> - <command> +<command> smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T - </command> -<precheck> -chkhostname curlhost -</precheck> </client> # @@ -58,7 +49,7 @@ chkhostname curlhost EHLO %TESTNUMBER
AUTH NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
diff --git a/tests/data/test91 b/tests/data/test91 index 5f8f585fc..2fc020128 100644 --- a/tests/data/test91 +++ b/tests/data/test91 @@ -4,6 +4,7 @@ HTTP HTTP GET HTTP NTLM auth +NTLM </keywords> </info> # Server-side @@ -75,7 +76,6 @@ Finally, this is the real page! NTLM SSL !SSPI -debug </features> <server> http @@ -83,18 +83,9 @@ http <name> HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 0 </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> +<command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER --anyauth -u mydomain\\myself:secret </command> -<precheck> -chkhostname curlhost -</precheck> </client> # Verify data after the test has been "shot" @@ -113,7 +104,7 @@ Accept: */* GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAAhoIBAMIyJpR5mHpg2FZha5kRaFZ9436GAxPu0C5llxexSQ5QzVkiLSfkcpVyRgCXXqR+Am15ZG9tYWlubXlzZWxmY3VybGhvc3Q=
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAALAAsAfgAAAAAAAAAAAAAAhoIBAMIyJpR5mHpg2FZha5kRaFZ9436GAxPu0C5llxexSQ5QzVkiLSfkcpVyRgCXXqR+Am15ZG9tYWlubXlzZWxmV09SS1NUQVRJT04=
User-Agent: curl/%VERSION
Accept: */*
diff --git a/tests/data/test921 b/tests/data/test921 index 57c4a7893..36820ceb7 100644 --- a/tests/data/test921 +++ b/tests/data/test921 @@ -6,6 +6,7 @@ SASL SASL AUTH NTLM SASL-IR RFC4954 +NTLM </keywords> </info> @@ -15,7 +16,7 @@ RFC4954 <servercmd> AUTH NTLM REPLY AUTH 334 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 235 Authenticated +REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= 235 Authenticated </servercmd> </reply> @@ -29,26 +30,16 @@ smtp NTLM SSL !SSPI -debug </features> - <name> +<name> SMTP NTLM authentication with initial response - </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> +</name> <stdin> mail body
</stdin> - <command> +<command> smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass --sasl-ir -T - </command> -<precheck> -chkhostname curlhost -</precheck> </client> # @@ -57,7 +48,7 @@ chkhostname curlhost <protocol>
EHLO %TESTNUMBER
AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
diff --git a/tests/data/test926 b/tests/data/test926 index aed6f4b8d..248cce9a7 100644 --- a/tests/data/test926 +++ b/tests/data/test926 @@ -31,9 +31,9 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient # # Verify data after the test has been "shot" <verify> -# 56 - CURLE_RECV_ERROR +# 8 - CURLE_WEIRD_SERVER_REPLY <errorcode> -56 +8 </errorcode> <protocol> EHLO %TESTNUMBER
diff --git a/tests/data/test957 b/tests/data/test957 index 5859f92fc..097385fe2 100644 --- a/tests/data/test957 +++ b/tests/data/test957 @@ -38,9 +38,9 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Användaren # # Verify data after the test has been "shot" <verify> -# 56 - CURLE_RECV_ERROR +# 8 - CURLE_WEIRD_SERVER_REPLY <errorcode> -56 +8 </errorcode> <protocol> EHLO %TESTNUMBER
diff --git a/tests/data/test958 b/tests/data/test958 index ce3de3342..1df158084 100644 --- a/tests/data/test958 +++ b/tests/data/test958 @@ -38,9 +38,9 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Användaren@example.com # # Verify data after the test has been "shot" <verify> -# 56 - CURLE_RECV_ERROR +# 8 - CURLE_WEIRD_SERVER_REPLY <errorcode> -56 +8 </errorcode> <protocol> EHLO %TESTNUMBER
diff --git a/tests/data/test961 b/tests/data/test961 index 02e265353..9cd10f574 100644 --- a/tests/data/test961 +++ b/tests/data/test961 @@ -39,9 +39,9 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt user@åäö.se # # Verify data after the test has been "shot" <verify> -# 56 - CURLE_RECV_ERROR +# 8 - CURLE_WEIRD_SERVER_REPLY <errorcode> -56 +8 </errorcode> <protocol> EHLO %TESTNUMBER
diff --git a/tests/data/test963 b/tests/data/test963 index 22b252a96..4ddc87162 100644 --- a/tests/data/test963 +++ b/tests/data/test963 @@ -29,7 +29,7 @@ LC_CTYPE=en_US.UTF-8 perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");' </precheck> <name> -SMTP without SMTPUTF8 support (IDN Enabked) - UTF-8 based recipient (host part only) +SMTP without SMTPUTF8 support (IDN Enabled) - UTF-8 based recipient (host part only) </name> <stdin> From: different
diff --git a/tests/data/test972 b/tests/data/test972 index 971f1faf6..0bcf04e39 100644 --- a/tests/data/test972 +++ b/tests/data/test972 @@ -28,9 +28,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i # # Client-side <client> -<precheck> -/usr/bin/which jsonlint-php >log/%TESTNUMBER-check -</precheck> + <server> http </server> @@ -47,7 +45,7 @@ CURL_VERSION=curl-unit-test-fake-version Verify JSON output </name> <command option="no-include"> -http://%HOSTIP:%HTTPPORT/%TESTNUMBER -s --write-out '%{json}' -o log/out972 | jsonlint-php -q +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -s --write-out '%{json}\n' -o log/out972 </command> </client> @@ -61,5 +59,8 @@ User-Agent: curl/%VERSION Accept: */*
</protocol> +<stdout mode="text"> +{"content_type":"text/html","errormsg":null,"exitcode":0,"filename_effective":"log/out972","ftp_entry_path":null,"http_code":200,"http_connect":0,"http_version":"1.1","local_ip":"%HOSTIP","local_port":13,"method":"GET","num_connects":1,"num_headers":9,"num_redirects":0,"proxy_ssl_verify_result":0,"redirect_url":null,"referer":null,"remote_ip":"%HOSTIP","remote_port":%HTTPPORT,"response_code":200,"scheme":"HTTP","size_download":445,"size_header":4019,"size_request":4019,"size_upload":0,"speed_download":13,"speed_upload":13,"ssl_verify_result":0,"time_appconnect":0.000013,"time_connect":0.000013,"time_namelookup":0.000013,"time_pretransfer":0.000013,"time_redirect":0.000013,"time_starttransfer":0.000013,"time_total":0.000013,"url":"http://%HOSTIP:%HTTPPORT/%TESTNUMBER","url_effective":"http://%HOSTIP:%HTTPPORT/%TESTNUMBER","urlnum":0,"curl_version":"curl-unit-test-fake-version"} +</stdout> </verify> </testcase> diff --git a/tests/data/test973 b/tests/data/test973 new file mode 100644 index 000000000..6ced10789 --- /dev/null +++ b/tests/data/test973 @@ -0,0 +1,88 @@ +<testcase> +<info> +<keywords> +HTTP +FTP +--location +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002 + +</data> +<data2> +data + to + see +that FTP +works + so does it? +</data2> + +<datacheck> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002 + +data + to + see +that FTP +works + so does it? +</datacheck> + +</reply> + +# +# Client-side +<client> +<server> +http +ftp +</server> + <name> +HTTP with auth redirected to FTP w/o auth + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -L -u joe:secret +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic am9lOnNlY3JldA==
+User-Agent: curl/%VERSION
+Accept: */*
+
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD a
+CWD path
+EPSV
+TYPE I
+SIZE %TESTNUMBER0002
+RETR %TESTNUMBER0002
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test974 b/tests/data/test974 new file mode 100644 index 000000000..5a834ac25 --- /dev/null +++ b/tests/data/test974 @@ -0,0 +1,91 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +--location +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 + +</data> +<data2> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Connection: close +Content-Type: text/html + +hey +</data2> + +<datacheck> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 + +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Connection: close +Content-Type: text/html + +hey +</datacheck> + +</reply> + +# +# Client-side +<client> +<features> +proxy +</features> +<server> +http +</server> + <name> +HTTP with auth redirected to HTTP on a diff port w/o auth + </name> + <command> +-x http://%HOSTIP:%HTTPPORT http://firsthost.com -L -u joe:secret +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET http://firsthost.com/ HTTP/1.1
+Host: firsthost.com
+Authorization: Basic am9lOnNlY3JldA==
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://firsthost.com:9999/a/path/%TESTNUMBER0002 HTTP/1.1
+Host: firsthost.com:9999
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test975 b/tests/data/test975 new file mode 100644 index 000000000..85e03e4f2 --- /dev/null +++ b/tests/data/test975 @@ -0,0 +1,88 @@ +<testcase> +<info> +<keywords> +HTTP +FTP +--location-trusted +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002 + +</data> +<data2> +data + to + see +that FTP +works + so does it? +</data2> + +<datacheck> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER0002 + +data + to + see +that FTP +works + so does it? +</datacheck> + +</reply> + +# +# Client-side +<client> +<server> +http +ftp +</server> + <name> +HTTP with auth redirected to FTP allowing auth to continue + </name> + <command> +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --location-trusted -u joe:secret +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic am9lOnNlY3JldA==
+User-Agent: curl/%VERSION
+Accept: */*
+
+USER joe
+PASS secret
+PWD
+CWD a
+CWD path
+EPSV
+TYPE I
+SIZE %TESTNUMBER0002
+RETR %TESTNUMBER0002
+QUIT
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test976 b/tests/data/test976 new file mode 100644 index 000000000..b2d948830 --- /dev/null +++ b/tests/data/test976 @@ -0,0 +1,92 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +--location-trusted +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 + +</data> +<data2> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Connection: close +Content-Type: text/html + +hey +</data2> + +<datacheck> +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 + +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Connection: close +Content-Type: text/html + +hey +</datacheck> + +</reply> + +# +# Client-side +<client> +<features> +proxy +</features> +<server> +http +</server> + <name> +HTTP with auth redirected to HTTP on a diff port --location-trusted + </name> + <command> +-x http://%HOSTIP:%HTTPPORT http://firsthost.com --location-trusted -u joe:secret +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET http://firsthost.com/ HTTP/1.1
+Host: firsthost.com
+Authorization: Basic am9lOnNlY3JldA==
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://firsthost.com:9999/a/path/%TESTNUMBER0002 HTTP/1.1
+Host: firsthost.com:9999
+Authorization: Basic am9lOnNlY3JldA==
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test977 b/tests/data/test977 new file mode 100644 index 000000000..cecfd13f0 --- /dev/null +++ b/tests/data/test977 @@ -0,0 +1,61 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP proxy +cookies +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 0 +Connection: close +Content-Type: text/html +Set-Cookie: a=b; Domain=.me.; + +</data> + +</reply> + +# +# Client-side +<client> +<features> +proxy +</features> +<server> +http +</server> + <name> +URL with trailing dot and receiving a cookie for the TLD with dot + </name> + <command> +-x http://%HOSTIP:%HTTPPORT http://firsthost.me. -c log/cookies%TESTNUMBER +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +GET http://firsthost.me./ HTTP/1.1
+Host: firsthost.me.
+User-Agent: curl/%VERSION
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol> +<file name="log/cookies%TESTNUMBER" mode="text"> +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +</file> +</verify> +</testcase> |