/
153.txt
151 lines (123 loc) · 5.93 KB
/
153.txt
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[3] [DFN[[CODE(HTTP)@en[[[Accept-Features:]]]]]] [[ヘッダー]]は、
対応している、あるいはしていない[[特徴]]を示すものです。
* 仕様書
[REFS[
- [1] [CITE@en[RFC 2295 - Transparent Content Negotiation in HTTP]] ([TIME[2014-08-31 19:36:42 +09:00]] 版) <http://tools.ietf.org/html/rfc2295#section-8.2>
]REFS]
* 構文
[4] [CODE(HTTP)@en[[[Accept-Features:]]]] [[ヘッダー]]の値は、
0個以上の値の[[リスト]] ([CODE(HTTP)[#]]) です [SRC[>>1]]。
[FIG(railroad)[
= ?
== 値
== *
=== [[OWS]]
=== [CODE(HTTP)[[[,]]]]
=== [[OWS]]
=== 値
]FIG]
[5] それぞれの値は[[特徴タグ]]などを使った式と、0個以上の[[引数]]です [SRC[>>1]]。
;; [6] 仕様書の時代的に構文上[[空白]]は明示されていませんが、
[CODE(HTTP)[[[;]]]] の前後に [[OWS]]、 [CODE(HTTP)[[[=]]]]
の前後に [[BWS]] が挿入されると推測されます。
[FIG(railroad)[
= 式
= *
== [[OWS]]
== [CODE(HTTP)[[[;]]]]
== [[OWS]]
== [[字句]]
== ?
== [CODE(HTTP)[[[=]]]]
=== |
==== [[字句]]
==== [[引用文字列]]
]FIG]
[7] ただし[[引数]]は拡張用で未定義 [SRC[>>1]] とされています。
* 文脈
[8] この[[ヘッダー]]は複数指定できます。
* 歴史
[FIG(quote)[
[FIGCAPTION[
[2] RFC 2295 (HTTP 透過内容折衝) 8.2 Accept-Features
]FIGCAPTION]
> The Accept-Features request header can be used by a user agent to
give information about the presence or absence of certain features in
the feature set of the current request. Servers can use this
information when running a remote variant selection algorithm.
[CODE(HTTP)[Accept-Features]] 要求頭は、
[[利用者エージェント]]が現在の[[要求]]の[[特注集合]]中のある[[特徴]]があるかないかについての情報を与えるために使うことが出来ます。
[[サーバー]]は、[[遠隔変種選択算法]]を動作させる時にこの情報を使うことが出来ます。
> Note: the name `Accept-Features' for this header was chosen
because of symmetry considerations with other Accept- headers,
even though the Accept-Features header will generally not contain
an exhaustive list of features which are somehow `accepted'. A
more accurate name of this header would have been `Feature-Set-Info'.
注意 : [CODE(HTTP)[Accept-Features]] というこの頭の名前は、
他の[[Accept‐頭]]との整合性のために選ばれましたが、
[CODE(HTTP)[Accept-Features]] 頭は通常はともかく「受け入れる」
特徴の完璧な目録を含みはしません。
この頭のもっと正確な名前は [CODE(HTTP)[Feature-Set-Info]]
辺りだったでしょう。
>
[PRE[
Accept-Features = "Accept-Features" ":"
#( feature-expr *( ";" feature-extension ) )
feature-expr = [ "!" ] ftag
| ftag ( "=" | "!=" ) tag-value
| ftag "=" "{" tag-value "}"
| "*"
feature-extension = token [ "=" ( token | quoted-string ) ]
]PRE]
> No feature extensions are defined in this specification. An example is:
[PRE[
Accept-Features: blex, !blebber, colordepth={5}, !screenwidth,
paper = A4, paper!="A2", x-version=104, *
]PRE]
> The different feature expressions have the following meaning:
: ftag : ftag is present
: !ftag : ftag is absent
: ftag=V : ftag is present with the value V
: ftag!=V : ftag is present, but not with the value V
: ftag={V} : ftag is present with the value V, and not with any other values
: * : the expressions in this header do not fully describe the feature set: feature tags not mentioned in this header may also be present, and, except for the case ftag={V}, tags may be present with more values than mentioned.
各特徴式は次の意味を持ちます。
: [CODE(conneg)[ftag]] : [VAR[ftag]] がある
: [CODE(conneg)[!ftag]] : [VAR[ftag]] がない
: [CODE(conneg)[ftag=V]] : [VAR[ftag]] は値 [VAR[V]] と共にある
: [CODE(conneg)[ftag!=V]] : [VAR[ftag]] はあるが値 [VAR[V]] と共にはない
: [CODE(conneg)[ftag={V}]] : [VAR[ftag]] は値 [VAR[V]] と共にあり、他のいかなる値とも共にはない
: [CODE(conneg)[*]] : この頭の式は[[特徴集合]]を完全に記述していない。
この頭に示されていない[[特徴札]]はあるかもしれないし、
[CODE(conneg)[ftag={V}]] の場合を除き、示されている値以外もあるかもしれない。
> Absence of the Accept-Features header in a request is equivalent to the inclusion of
- [SAMP(HTTP)[Accept-Features: *]]
> By using the Accept-Features header, a remote variant selection
algorithm can sometimes determine the truth value of a feature
predicate on behalf of the user agent. For example, with the header
[PRE[
Accept-Features: blex, !blebber, colordepth={5}, !screenwidth,
paper = A4, paper!="A2", x-version=104, *
]PRE]
the algorithm can determine that the following predicates are true:
[PRE[
blex, colordepth=[4-], colordepth!=6, colordepth, !screenwidth,
paper=A4, colordepth=[4-6]
]PRE]
and that the following predicates are false:
[PRE[
!blex, blebber, colordepth=6, colordepth=foo, !colordepth,
screenwidth, screenwidth=640, screenwidth!=640,
]PRE]
but the truth value of the following predicates cannot be determined:
[PRE[
UA-media=stationary, UA-media!=screen, paper!=a0,
x-version=[100-300], x-version=[200-300], x-version=99,
UA-media=screen, paper=A0, paper=a4, x-version=[100-199], wuxta
]PRE]
]FIG]
** RFC 4229
[10] [[RFC 4229]] は [[RFC 2295]] を出典に[[IANA登録簿]]に状態「[[実験的]]」で登録しています [SRC[>>9]]。
[REFS[
- [9] [CITE@en[RFC 4229 - HTTP Header Field Registrations]] ([TIME[2014-11-02 18:53:20 +09:00]] 版) <http://tools.ietf.org/html/rfc4229#section-2.1.6>
]REFS]