Git init
[external/curl.git] / tests / data / test1056
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 followlocation
7 IPv6
8 </keywords>
9 </info>
10
11 #
12 # Server-side
13 <reply>
14 <data>
15 HTTP/1.1 302 OK swsclose\r
16 Location: http://[::1%259999]:8994/moo/10560002\r
17 Date: Thu, 31 Jul 2008 14:49:00 GMT\r
18 Connection: close\r
19 \r
20 </data>
21 <data2>
22 HTTP/1.1 200 OK swsclose\r
23 Date: Thu, 31 Jul 2008 14:49:00 GMT\r
24 Connection: close\r
25 \r
26 body
27 </data2>
28 <datacheck>
29 HTTP/1.1 302 OK swsclose\r
30 Location: http://[::1%259999]:8994/moo/10560002\r
31 Date: Thu, 31 Jul 2008 14:49:00 GMT\r
32 Connection: close\r
33 \r
34 HTTP/1.1 200 OK swsclose\r
35 Date: Thu, 31 Jul 2008 14:49:00 GMT\r
36 Connection: close\r
37 \r
38 body
39 </datacheck>
40 </reply>
41
42 #
43 # Client-side
44 <client>
45 <features>
46 ipv6
47 </features>
48 <server>
49 http
50 http-ipv6
51 </server>
52  <name>
53 HTTP follow redirect from IPv4 to IPv6 with scope
54  </name>
55  <command>
56 http://%HOSTIP:%HTTPPORT/we/are/all/twits/1056 -L
57 </command>
58 # The data section doesn't do variable substitution, so we must assert this
59 <precheck>
60 perl -e "print 'Test requires default test server host and port' if ( '%HOST6IP' ne '[::1]' || '%HTTP6PORT' ne '8994' );"
61 </precheck>
62 </client>
63
64 #
65 # Verify data after the test has been "shot"
66 <verify>
67 <strip>
68 ^User-Agent:.*
69 </strip>
70 <protocol>
71 GET /we/are/all/twits/1056 HTTP/1.1\r
72 Host: %HOSTIP:%HTTPPORT\r
73 Accept: */*\r
74 \r
75 GET /moo/10560002 HTTP/1.1\r
76 Host: %HOST6IP:%HTTP6PORT\r
77 Accept: */*\r
78 \r
79 </protocol>
80 </verify>
81 </testcase>