From 8dfddd279b450fa460950f6bb13323c66a2256a5 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 8 Oct 2008 21:46:55 +0000 Subject: [PATCH] Added tests 1082 through 1085 to test symbolic --interface parameters --- CHANGES | 3 +++ tests/data/Makefile.am | 2 +- tests/data/test1045 | 2 +- tests/data/test1046 | 2 +- tests/data/test1082 | 55 +++++++++++++++++++++++++++++++++++++++ tests/data/test1083 | 59 ++++++++++++++++++++++++++++++++++++++++++ tests/data/test1084 | 37 ++++++++++++++++++++++++++ tests/data/test1085 | 41 +++++++++++++++++++++++++++++ 8 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 tests/data/test1082 create mode 100644 tests/data/test1083 create mode 100644 tests/data/test1084 create mode 100644 tests/data/test1085 diff --git a/CHANGES b/CHANGES index c0759c029..99899eae8 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,9 @@ Changelog +Daniel Fandrich (8 Oct 2008) +- Added tests 1082 through 1085 to test symbolic --interface parameters + Daniel Stenberg (8 Oct 2008) - Igor filed bug #2111613 (http://curl.haxx.se/bug/view.cgi?id=2111613) that eventually identified a flaw in how the multi_socket interface in some cases diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index a7b4fc1fb..fa02c5a54 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -58,7 +58,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063 \ test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071 \ test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 \ - test1080 test1081 + test1080 test1081 test1082 test1083 test1084 test1085 filecheck: @mkdir test-place; \ diff --git a/tests/data/test1045 b/tests/data/test1045 index 97f3a7297..fa8ad4b44 100644 --- a/tests/data/test1045 +++ b/tests/data/test1045 @@ -29,7 +29,7 @@ Content-Type: text/plain http -HTTP GET with localhost --interface +HTTP GET with numeric localhost --interface http://%HOSTIP:%HTTPPORT/1045 --interface %CLIENTIP diff --git a/tests/data/test1046 b/tests/data/test1046 index 59da6dce4..bc4e5c293 100644 --- a/tests/data/test1046 +++ b/tests/data/test1046 @@ -33,7 +33,7 @@ ipv6 http-ipv6 -HTTP-IPv6 GET with localhost --interface +HTTP-IPv6 GET with numeric localhost --interface -g "http://%HOST6IP:%HTTP6PORT/1046" --interface ::1 diff --git a/tests/data/test1082 b/tests/data/test1082 new file mode 100644 index 000000000..d58dd25cd --- /dev/null +++ b/tests/data/test1082 @@ -0,0 +1,55 @@ + + + +HTTP +HTTP GET +--interface + + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Mon, 28 Jul 2008 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/plain + +-foo- + + + +# +# Client-side + + +http + + +HTTP GET with localhost --interface + + +http://%HOSTIP:%HTTPPORT/1082 --interface localhost + + +perl -e "print 'Test requires default test server host address' if ( '%CLIENTIP' ne '127.0.0.1' );" + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1082 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + diff --git a/tests/data/test1083 b/tests/data/test1083 new file mode 100644 index 000000000..4a21b9a43 --- /dev/null +++ b/tests/data/test1083 @@ -0,0 +1,59 @@ + + + +HTTP +HTTP GET +--interface +IPv6 + + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Mon, 28 Jul 2008 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/plain + +-foo- + + + +# +# Client-side + + +ipv6 + + +http-ipv6 + + +HTTP-IPv6 GET with ip6-localhost --interface + + +-g "http://%HOST6IP:%HTTP6PORT/1083" --interface ip6-localhost + + +perl -e "print 'Test requires default test server host address' if ( '%CLIENT6IP' ne '[::1]' );" && ./server/resolve --ipv6 ip6-localhost + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1083 HTTP/1.1 +Host: %HOST6IP:%HTTP6PORT +Accept: */* + + + + diff --git a/tests/data/test1084 b/tests/data/test1084 new file mode 100644 index 000000000..fdaa16a74 --- /dev/null +++ b/tests/data/test1084 @@ -0,0 +1,37 @@ + + + +HTTP +HTTP GET +--interface +FAILURE + + + +# +# Server-side + + + +# +# Client-side + + +none + + +HTTP GET with invalid --interface + + +http://%HOSTIP:%HTTPPORT/1084 --interface non-existing-host.haxx.se. + + + +# +# Verify data after the test has been "shot" + + +7 + + + diff --git a/tests/data/test1085 b/tests/data/test1085 new file mode 100644 index 000000000..a69a9db64 --- /dev/null +++ b/tests/data/test1085 @@ -0,0 +1,41 @@ + + + +HTTP +HTTP GET +--interface +IPv6 +FAILURE + + + +# +# Server-side + + + +# +# Client-side + + +ipv6 + + +none + + +HTTP-IPv6 GET with invalid --interface + + +-g "http://%HOST6IP:%HTTP6PORT/1085" --interface non-existing-host.haxx.se. + + + +# +# Verify data after the test has been "shot" + + +7 + + +