1# test http block cookies
2
3use strict;
4use warnings;
5
6my @lengths = (1, 2, 3, 4);
7my @cookies = ("med=thx; domain=.foo.bar; path=/; expires=Mon, 27-Oct-2014 04:11:56 GMT;", "", "", "");
8our %args = (
9    client => {
10	func => \&http_client,
11	loggrep => {
12	    qr/Client missing http 1 response/ => 2,
13	    qr/Set-Cookie: a\=b\;/ => 6,
14	},
15	cookies => \@cookies,
16	lengths => \@lengths,
17    },
18    relayd => {
19	protocol => [ "http",
20	    'block request cookie log "med" value "thx"',
21	    'match response cookie append "a" value "b" tag "cookie"',
22	    'pass tagged "cookie"',
23	],
24	loggrep => qr/Forbidden, \[Cookie: med=thx.*/,
25    },
26    server => {
27	func => \&http_server,
28    },
29    lengths => [2, 3, 4],
30);
31
321;
33