]> granicus.if.org Git - curl/commitdiff
Added test of IPv6 scope handling
authorDan Fandrich <dan@coneharvesters.com>
Thu, 31 Jul 2008 02:38:51 +0000 (02:38 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 31 Jul 2008 02:38:51 +0000 (02:38 +0000)
tests/data/Makefile.am
tests/data/test1056 [new file with mode: 0644]

index df25a72470baa8b05e63a6067eea1b0c04ec7663..e6df0cca04ca75612802b0c26b2c6b8cb1df5716 100644 (file)
@@ -54,7 +54,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46           \
  test556 test1031 test628 test629 test630 test631 test632 test1032         \
  test1033 test539 test1034 test1035 test1036 test1037 test1038 test1039    \
  test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047   \
- test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055
+ test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055   \
+ test1056
 
 filecheck:
        @mkdir test-place; \
diff --git a/tests/data/test1056 b/tests/data/test1056
new file mode 100644 (file)
index 0000000..52b0136
--- /dev/null
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+followlocation
+IPv6
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 OK swsclose\r
+Location: http://[::1%259999]:8994/moo/10560002\r
+Date: Thu, 31 Jul 2008 14:49:00 GMT\r
+Connection: close\r
+\r
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose\r
+Date: Thu, 31 Jul 2008 14:49:00 GMT\r
+Connection: close\r
+\r
+body
+</data2>
+<datacheck>
+HTTP/1.1 302 OK swsclose\r
+Location: http://[::1%259999]:8994/moo/10560002\r
+Date: Thu, 31 Jul 2008 14:49:00 GMT\r
+Connection: close\r
+\r
+HTTP/1.1 200 OK swsclose\r
+Date: Thu, 31 Jul 2008 14:49:00 GMT\r
+Connection: close\r
+\r
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+http
+http-ipv6
+</server>
+ <name>
+HTTP follow redirect from IPv4 to IPv6 with scope
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/1056 -L
+</command>
+# The data section doesn't do variable substitution, so we must assert this
+<precheck>
+perl -e "print 'Test requires default test server host and port' if ( '%HOST6IP' ne '[::1]' || '%HTTP6PORT' ne '8994' );"
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/are/all/twits/1056 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /moo/10560002 HTTP/1.1\r
+Host: %HOST6IP:%HTTP6PORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>