• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<features>
69proxy
70</features>
71</client>
72
73#
74# Verify data after the test has been "shot"
75<verify>
76<protocol>
77GET http://first.host.it.is/we/want/that/page/317 HTTP/1.1
78Host: first.host.it.is
79User-Agent: curl/%VERSION
80Accept: */*
81Proxy-Connection: Keep-Alive
82Cookie: test=yes
83
84GET http://goto.second.host.now/3170002 HTTP/1.1
85Host: goto.second.host.now
86User-Agent: curl/%VERSION
87Accept: */*
88Proxy-Connection: Keep-Alive
89
90</protocol>
91</verify>
92</testcase>
93