aboutsummaryrefslogtreecommitdiff
path: root/models/openid-php-openid-782224d/Tests/Auth/Yadis/data/accept.txt
blob: 0853321a8dcda66308d261a2cf39d640bf8a133e (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
117
118
# Accept: [Accept: header value from RFC2616,
#     http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html]
# Available: [whitespace-separated content types]
# Expected: [Accept-header like list, containing the available content
#     types with their q-values]

Accept: */*
Available: text/plain
Expected: text/plain; q=1.0

Accept: */*
Available: text/plain, text/html
Expected: text/plain; q=1.0, text/html; q=1.0

# The order matters
Accept: */*
Available: text/html, text/plain
Expected: text/html; q=1.0, text/plain; q=1.0

Accept: text/*, */*; q=0.9
Available: text/plain, image/jpeg
Expected: text/plain; q=1.0, image/jpeg; q=0.9

Accept: text/*, */*; q=0.9
Available: image/jpeg, text/plain
Expected: text/plain; q=1.0, image/jpeg; q=0.9

# wildcard subtypes still reject differing main types
Accept: text/*
Available: image/jpeg, text/plain
Expected: text/plain; q=1.0

Accept: text/html
Available: text/html
Expected: text/html; q=1.0

Accept: text/html, text/*
Available: text/html
Expected: text/html; q=1.0

Accept: text/html, text/*
Available: text/plain, text/html
Expected: text/plain; q=1.0, text/html; q=1.0

Accept: text/html, text/*; q=0.9
Available: text/plain, text/html
Expected: text/html; q=1.0, text/plain; q=0.9

# If a more specific type has a higher q-value, then the higher value wins
Accept: text/*; q=0.9, text/html
Available: text/plain, text/html
Expected: text/html; q=1.0, text/plain; q=0.9

Accept: */*, text/*; q=0.9, text/html; q=0.1
Available: text/plain, text/html, image/monkeys
Expected: image/monkeys; q=1.0, text/plain; q=0.9, text/html; q=0.1

Accept: text/*, text/html; q=0
Available: text/html
Expected:

Accept: text/*, text/html; q=0
Available: text/html, text/plain
Expected: text/plain; q=1.0

Accept: text/html
Available: text/plain
Expected:

Accept: application/xrds+xml, text/html; q=0.9
Available: application/xrds+xml, text/html
Expected: application/xrds+xml; q=1.0, text/html; q=0.9

Accept: application/xrds+xml, */*; q=0.9
Available: application/xrds+xml, text/html
Expected: application/xrds+xml; q=1.0, text/html; q=0.9

Accept: application/xrds+xml, application/xhtml+xml; q=0.9, text/html; q=0.8, text/xml; q=0.7
Available: application/xrds+xml, text/html
Expected: application/xrds+xml; q=1.0, text/html; q=0.8

# See http://www.rfc-editor.org/rfc/rfc3023.txt, section A.13
Accept: application/xrds
Available: application/xrds+xml
Expected:

Accept: application/xrds+xml
Available: application/xrds
Expected:

Accept: application/xml
Available: application/xrds+xml
Expected:

Available: application/xrds+xml
Accept: application/xml
Expected:



#################################################
# The tests below this line are documentation of how this library
# works. If the implementation changes, it's acceptable to change the
# test to reflect that. These are specified so that we can make sure
# that the current implementation actually works the way that we
# expect it to given these inputs.

Accept: text/html;level=1
Available: text/html
Expected: text/html; q=1.0

Accept: text/html; level=1, text/html; level=9; q=0.1
Available: text/html
Expected: text/html; q=1.0

Accept: text/html; level=9; q=0.1, text/html; level=1
Available: text/html
Expected: text/html; q=1.0