1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7cookies
8</keywords>
9</info>
10
11# Server-side
12<reply>
13<data>
14HTTP/1.1 301 Moved
15Date: Thu, 09 Nov 2010 14:49:00 GMT
16Location: /want/data/11040002
17Server: test-server/fake
18Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
19Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 13 11:56:27 GMT 2037;
20Connection: close
21
22This server reply is for testing a set-cookie
23
24</data>
25<data2>
26HTTP/1.1 200 Followed here fine swsclose
27Date: Thu, 09 Nov 2010 14:49:00 GMT
28Server: test-server/fake
29Content-Length: 52
30
31If this is received, the location following worked
32
33</data2>
34<datacheck>
35HTTP/1.1 301 Moved
36Date: Thu, 09 Nov 2010 14:49:00 GMT
37Location: /want/data/11040002
38Server: test-server/fake
39Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
40Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 13 11:56:27 GMT 2037;
41Connection: close
42
43HTTP/1.1 200 Followed here fine swsclose
44Date: Thu, 09 Nov 2010 14:49:00 GMT
45Server: test-server/fake
46Content-Length: 52
47
48If this is received, the location following worked
49
50</datacheck>
51</reply>
52
53# Client-side
54<client>
55<server>
56http
57</server>
58 <name>
59HTTP cookie expiry date at Jan 1 00:00:00 GMT 1970
60 </name>
61 <command>
62http://%HOSTIP:%HTTPPORT/want/1104 -L -x %HOSTIP:%HTTPPORT -c log/cookies1104.jar
63</command>
64<features>
65proxy
66</features>
67</client>
68
69# Verify data after the test has been "shot"
70<verify>
71<protocol>
72GET http://%HOSTIP:%HTTPPORT/want/1104 HTTP/1.1
73Host: %HOSTIP:%HTTPPORT
74User-Agent: curl/%VERSION
75Accept: */*
76Proxy-Connection: Keep-Alive
77
78GET http://%HOSTIP:%HTTPPORT/want/data/11040002 HTTP/1.1
79Host: %HOSTIP:%HTTPPORT
80User-Agent: curl/%VERSION
81Accept: */*
82Proxy-Connection: Keep-Alive
83Cookie: test2=true
84
85</protocol>
86</verify>
87</testcase>
88