1INCLUDE $TOP/test/config.htb
2
3CLIENT
4_AUTO_COOKIE on
5
6# get a set cookie
7_REQ $YOUR_HOST $YOUR_PORT
8__GET /your/path/to/your/resource?your=params HTTP/1.1
9__Host: $YOUR_HOST
10__Cookie: AUTO
11__
12_WAIT
13
14# use this cookie every time
15_LOOP 5
16_REQ $YOUR_HOST $YOUR_PORT
17__GET /your/path/to/your/resource?your=params HTTP/1.1
18__Host: $YOUR_HOST
19__Cookie: AUTO
20__
21_WAIT
22_END LOOP
23
24# get a set cookie with the same name
25_REQ $YOUR_HOST $YOUR_PORT
26__GET /your/path/to/your/resource?your=params HTTP/1.1
27__Host: $YOUR_HOST
28__Cookie: AUTO
29__
30_WAIT
31
32# use this overwritten cookie every time
33_LOOP 5
34_REQ $YOUR_HOST $YOUR_PORT
35__GET /your/path/to/your/resource?your=params HTTP/1.1
36__Host: $YOUR_HOST
37__Cookie: AUTO
38__
39_WAIT
40_END LOOP
41
42# get a new set cookie with
43_REQ $YOUR_HOST $YOUR_PORT
44__GET /your/path/to/your/resource?your=params HTTP/1.1
45__Host: $YOUR_HOST
46__Cookie: AUTO
47__
48_WAIT
49
50# use both cookies every time
51_LOOP 5
52_REQ $YOUR_HOST $YOUR_PORT
53__GET /your/path/to/your/resource?your=params HTTP/1.1
54__Host: $YOUR_HOST
55__Cookie: AUTO
56__
57_WAIT
58_END LOOP
59
60END
61
62SERVER $YOUR_PORT
63_RES
64_EXPECT headers "!Cookie"
65_WAIT
66__HTTP/1.1 200 OK
67__Content-Length: AUTO
68__Connection: close
69__Set-Cookie: foo=fasel; path=/bla/bla
70__
71__== OK ==
72
73_LOOP 5
74_RES
75_EXPECT headers "Cookie: foo=fasel"
76_WAIT
77__HTTP/1.1 200 OK
78__Content-Length: AUTO
79__Connection: close
80__
81__== OK ==
82_END LOOP
83
84_RES
85_WAIT
86__HTTP/1.1 200 OK
87__Content-Length: AUTO
88__Connection: close
89__Set-Cookie: foo=blubi; path=/bla/bla
90__
91__== OK ==
92
93_LOOP 5
94_RES
95_EXPECT headers "Cookie: foo=blubi"
96_WAIT
97__HTTP/1.1 200 OK
98__Content-Length: AUTO
99__Connection: close
100__
101__== OK ==
102_END LOOP
103
104_RES
105_WAIT
106__HTTP/1.1 200 OK
107__Content-Length: AUTO
108__Connection: close
109__Set-Cookie: foo2=fasel; path=/bla/bla
110__
111__== OK ==
112
113_LOOP 5
114_RES
115_EXPECT headers "Cookie: foo=blubi; foo2=fasel"
116_WAIT
117__HTTP/1.1 200 OK
118__Content-Length: AUTO
119__Connection: close
120__
121__== OK ==
122_END LOOP
123
124END
125
126