summaryrefslogtreecommitdiffstats
path: root/kioslave/http/kcookiejar/tests/cookie_settings.test
blob: 7fc1a03a7a7c2ba1f7fa63e38e6febc03d234476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
## Check CookieGlobalAdvice setting
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value1; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value2; Path="/"
CONFIG CookieGlobalAdvice Reject
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value3; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value4; Path="/"
CONFIG CookieGlobalAdvice Accept
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value5; Path="/"; expires=%NEXTYEAR%
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value6; Path="/"
CONFIG CookieGlobalAdvice Ask
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value7; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value8; Path="/"
CONFIG AcceptSessionCookies true
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
# FIXME: Shouldn't this be considered a session cookie?
# COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="0"
# COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%LASTYEAR%
# FIXME: The 'Discard' attribute makes the cookie a session cookie
# COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
## Treat all cookies as session cookies
CONFIG IgnoreExpirationDate true
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check host-based domain policies
CONFIG IgnoreExpirationDate false
CONFIG AcceptSessionCookies false
CONFIG CookieDomainAdvice a.b.c:Reject
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE ASK http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ASK http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ASK http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check resetting of domain policies
CONFIG CookieDomainAdvice
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ASK http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE ASK http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ASK http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ASK http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check domain policies
CONFIG CookieDomainAdvice .b.c:Reject
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE REJECT http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE REJECT http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE REJECT http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check overriding of domain policies #1
CONFIG CookieDomainAdvice .b.c:Reject,a.b.c:Accept
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE REJECT http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE REJECT http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE REJECT http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check overriding of domain policies #2
CONFIG CookieDomainAdvice a.b.c:Reject,.b.c:Accept
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE ACCEPT http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ACCEPT http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check resetting of domain policies
CONFIG CookieDomainAdvice
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ASK http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ASK http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE ASK http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ASK http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ASK http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check overriding of domain policies #3
CONFIG CookieDomainAdvice b.c:Reject,.b.c:Accept
COOKIE REJECT http://b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE REJECT http://b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE REJECT http://b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
## Check overriding of domain policies #4
CONFIG CookieDomainAdvice .a.b.c.d:Reject,.b.c.d:Accept,.c.d:Ask
COOKIE REJECT http://www.a.b.c.d/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ACCEPT http://www.b.c.d/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE ASK http://www.c.d/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
## Check interaction with session policy
CONFIG AcceptSessionCookies true
CONFIG CookieDomainAdvice .b.c:Reject
COOKIE REJECT http://a.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://a.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://a.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://a.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"
COOKIE REJECT http://d.b.c/ Set-Cookie: some_value=value9; Path="/"; expires=%NEXTYEAR%
COOKIE REJECT http://d.b.c/ Set-Cookie2: some_value=value10; Version=1; Path="/"; max-age="600"
COOKIE ACCEPT http://d.b.c/ Set-Cookie: some_value=value11; Path="/"
COOKIE ACCEPT http://d.b.c/ Set-Cookie2: some_value=value12; Version=1; Path="/"