1<testcase>
2<info>
3<keywords>
4HTTP
5followlocation
6cookies
7</keywords>
8</info>
9#
10# Server-side
11<reply>
12<data>
13HTTP/1.1 302 OK
14Date: Thu, 09 Nov 2010 14:49:00 GMT
15Server: test-server/fake swsclose
16Content-Type: text/html
17Funny-head: yesyes
18Location: http://goto.second.host.now/3170002
19Content-Length: 8
20Connection: close
21
22contents
23</data>
24<data2>
25HTTP/1.1 200 OK
26Date: Thu, 09 Nov 2010 14:49:00 GMT
27Server: test-server/fake swsclose
28Content-Type: text/html
29Funny-head: yesyes
30Content-Length: 9
31
32contents
33</data2>
34
35<datacheck>
36HTTP/1.1 302 OK
37Date: Thu, 09 Nov 2010 14:49:00 GMT
38Server: test-server/fake swsclose
39Content-Type: text/html
40Funny-head: yesyes
41Location: http://goto.second.host.now/3170002
42Content-Length: 8
43Connection: close
44
45HTTP/1.1 200 OK
46Date: Thu, 09 Nov 2010 14:49:00 GMT
47Server: test-server/fake swsclose
48Content-Type: text/html
49Funny-head: yesyes
50Content-Length: 9
51
52contents
53</datacheck>
54</reply>
55
56#
57# Client-side
58<client>
59<server>
60http
61</server>
62 <name>
63HTTP with custom Cookie: and redirect to new host
64 </name>
65 <command>
66http://first.host.it.is/we/want/that/page/317 -x %HOSTIP:%HTTPPORT -H "Cookie: test=yes" --location
67</command>
68</client>
69
70#
71# Verify data after the test has been "shot"
72<verify>
73<strip>
74^User-Agent:.*
75</strip>
76<protocol>
77GET http://first.host.it.is/we/want/that/page/317 HTTP/1.1
78Host: first.host.it.is
79Accept: */*
80Proxy-Connection: Keep-Alive
81Cookie: test=yes
82
83GET http://goto.second.host.now/3170002 HTTP/1.1
84Host: goto.second.host.now
85Accept: */*
86Proxy-Connection: Keep-Alive
87
88</protocol>
89</verify>
90</testcase>
91