9 ###############################################################################
11 my $page1 = "Hello, world!\n";
12 my $page2 = "Goodbye, Sam.\n";
13 my $page3 = "Page three.\n";
14 my $page4 = "Page four.\n";
15 my $page5 = "Page five.\n";
16 my $page6 = "Page six.\n";
18 # code, msg, headers, content
24 "Content-type" => "text/plain",
25 "Set-Cookie" => "foo=bar",
34 "Cookie" => qr|foo=bar|,
37 # remove the cookie 'foo'
42 "Content-type" => "text/plain",
43 "Set-Cookie" => "foo=; Expires=Sun, 06 Nov 1994 08:49:37 GMT",
52 "!Cookie" => qr|foo=|,
55 # try to set a cookie 'foo' with mismatching domain
56 # see RFC 6265 5.3.6: ignore the cookie if it doesn't domain-match
61 "Content-type" => "text/plain",
62 "Set-Cookie" => "foo=bar; domain=.example.com",
71 "!Cookie" => qr|foo=bar|,
76 my $cmdline = $WgetTest::WGETPATH . " http://localhost:{{port}}/one.txt"
77 . " http://localhost:{{port}}/two.txt" . " http://localhost:{{port}}/three.txt"
78 . " http://localhost:{{port}}/four.txt" . " http://localhost:{{port}}/five.txt"
79 . " http://localhost:{{port}}/six.txt";
81 my $expected_error_code = 0;
83 my %expected_downloaded_files = (
104 ###############################################################################
106 my $the_test = HTTPTest->new (name => "Test-cookies",
109 errcode => $expected_error_code,
110 output => \%expected_downloaded_files);
111 exit $the_test->run();