/
276.txt
197 lines (156 loc) · 8.45 KB
/
276.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[4] [[HTTP]] の [DFN[[CODE(HTTP)@en[[[Negotiate:]]]]]] [[ヘッダー]]は、
当該[[要求]]によって開始される[[内容折衝]]に関する指示を含めるものです。
* 仕様書
[REFS[
- [22] [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-2.2>
- [9] '''[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-7.1>'''
]REFS]
* 意味
[10] [CODE(HTTP)@en[[[Negotiate:]]]] [[ヘッダー]]は、当該[[要求]]によって開始する[[内容折衝]]手続きについての[[指令]]を表します [SRC[>>9]]。
* 構文
[11] [CODE(HTTP)@en[[[Negotiate:]]]] [[ヘッダー]]の値は、1つ以上の[[指令]]の[[リスト]]
([CODE(HTTP)[#]]) です [SRC[>>9]]。
[FIG(railroad)[
= [[指令]]
= *
== [[OWS]]
== [CODE(HTTP)[[[,]]]]
== [[OWS]]
== [[指令]]
]FIG]
[12] [[指令]]は、[[字句]]か、[CODE(HTTP)[[[*]]]] か、[[RVSA]] の版か、
[[字句]]2つを [CODE(HTTP)[[[=]]]] で連ねたものです [SRC[>>9]]。
[FIG(railroad)[
= |
== [CODE(HTTP)[[[*]]]]
== [[RVSA]] の版
== =
=== [[字句]]
=== ?
==== [CODE(HTTP)[[[=]]]]
==== [[字句]]
]FIG]
;; [13] [[字句]]の解釈は明記されていませんが、規定されているものはすべて構文上[[大文字・小文字不区別]]となっています。重複する指定も禁止はされていません。
* 文脈
[18] [[利用者エージェント]]が[[要求]]に指定できます。
[[利用者エージェント]]が[[透過内容折衝]]に対応することを示す
[CODE(HTTP)@en[[[Negotiate:]]]] [[ヘッダー]]を含めることが[[透過内容折衝]]への「[[対応]]」
の定義となっています [SRC[>>22]]。
[19] この[[ヘッダー]]は複数指定できます。
* 指令
[14] 次の[[指令]]があります。
[FIG(short list)[
- [CODE(HTTP)[[[trans]]]]
- [CODE(HTTP)[[[vlist]]]]
- [CODE(HTTP)[[[guess-small]]]]
- [CODE(HTTP)[[[1.0]]]]
- [CODE(HTTP)[[[*]]]]
]FIG]
[15] 値を取る構文を使っているものは現時点ではありません。いずれも[[指令]]の名前のみ指定します。
[16] [[鯖]]は理解できない[[指令]]を無視する[['''べきです''']] [SRC[>>9]]。
[20] [[IANA登録簿]]は無いようです。
* 処理モデル
[21] [[透過的折衝可能資源]]が [CODE(HTTP)@en[[[Negotiate:]]]] [[ヘッダー]]を指定された時の動作は、
[[透過的折衝可能資源]]、[[鯖側上書き]]を参照。
[17] [[鯖]]は複数の対応している [[RVSA]] の版が指定された時は、
何らかの内部的な決定方法で選ぶ[['''べきです''']] [SRC[>>9]]。
* 歴史
[FIG(quote)[
[FIGCAPTION[
[2] RFC 2295 (HTTP 透過内容折衝) 8.4 Negotiate
]FIGCAPTION]
> The Negotiate request header can contain directives for any content
negotiation process initiated by the request.
>
- Negotiate = "Negotiate" ":" 1#negotiate-directive
-
[PRE[
negotiate-directive = "trans"
| "vlist"
| "guess-small"
| rvsa-version
| "*"
| negotiate-extension
]PRE]
- negotiate-extension = token [ "=" token ]
> Examples are
- Negotiate: 1.0, 2.5
- Negotiate: *
> The negotiate directives have the following meaning
>
:"trans":
The user agent supports transparent content negotiation for the current request.
:"vlist":
The user agent requests that any transparently negotiated
response for the current request includes an Alternates
header with the variant list bound to the negotiable resource. Implies "trans".
:"guess-small":
The user agent allows origin servers to run a custom algorithm
which guesses the best variant for the request, and to return
this variant in a choice response, if the resulting choice
response is smaller than or not much larger than a list
response. The definition of `not much larger' is left to
origin server heuristics. Implies "vlist" and "trans".
:rvsa-version:
The user agent allows origin servers and proxies to run the
remote variant selection algorithm with the indicated version
number, or with the same major version number and a higher
minor version number. If the algorithm has sufficient
information to choose a best, neighboring variant, the origin
server or proxy MAY return a choice response with this variant. Implies "trans".
:"*":
The user agent allows origin servers and proxies to run any
remote variant selection algorithm. The origin server may
even run algorithms which have not been standardized. If the
algorithm has sufficient information to choose a best,
neighboring variant, the origin server or proxy MAY return a
choice response with this variant. Implies "trans".
:"trans":[[利用者エージェント]]は現在の[[要求]]で[[透過内容折衝]]に対応します。
:"vlist":利用者エージェントは現在の要求への[[透過折衝済み応答]]に[[折衝可能資源]]に束縛された[[変種目録]]の入った
[CODE(HTTP)[[[Alternates]]]] 頭を含むことを要求します。
[CODE(HTTP)[trans]] を暗示します。
:"guess-small":利用者エージェントは[[起源サーバー]]がその要求に対する最善の変種を推測する custom 算法を実行し、その変種を[[選択応答]]で返すとしたら[[目録応答]]より小さいか又はさして大きくならないのであれば、その変種の選択応答を認めます。
「さして大きくない」の定義は起源サーバーの学習に任せます。
[CODE(HTTP)[vlist]] と [CODE(HTTP)[trans]] を暗示します。
:rvsa-version:利用者エージェントは起源サーバー及び[[串]]が示された版番号又は同じ大版番号で小版番号が示されているもの以上の版の[[遠隔変種選択算法]]を実行するのを認めます。
算法が最善の[[隣接変種]]を選ぶのに十分な情報を持っていれば、
サーバー又は串はこの変種を[[選択応答]]で返しても'''構いません'''。
[CODE(HTTP)[trans]] を暗示します。
:"*":利用者エージェントは期限サーバー及び串が任意の遠隔変種選択算法を実行することを認めます。起源サーバーは標準化されていない算法を実行しても一向に構いません。
算法が最善の[[隣接変種]]を選ぶのに十分な情報を持っていれば、
サーバー又は串はこの変種を選択応答で返しても'''構いません'''。
[CODE(HTTP)[trans]] を暗示します。
> Servers SHOULD ignore all negotiate-directives they do not
understand. If the Negotiate header allows a choice between multiple
remote variant selection algorithms which are all supported by the
server, the server SHOULD use some internal precedence heuristics to
select the best algorithm.
]FIG]
** RFC 4229
[8] [[RFC 4229]] は [[RFC 2295]] を出典に状態「[[実験的]]」で
[[IANA登録簿]]に登録しています [SRC[>>7]]。
[REFS[
- [7] [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.69>
]REFS]
* 関連
[3] [CODE(ABNF)@en[[[auth-scheme]]]] の [CODE(HTTP)@en[[[Negotiate]]]]
とは関係ありません。
* メモ
[1]
[[要求]]に対して[[鯖]]が[[内容折衝]]を行い、1つの[[表現]]を返す場合の[[応答]]中の
[CODE(HTTP)@en[[[Vary]]]] 欄の例:
[PRE(HTTP example code)[
[[Vary]]: negotiate, [[Accept-Language]]
]PRE]
この例では[[要求]]の [CODE(HTTP)@en[Negotiate]] 欄と
[CODE(HTTP)@en[[[Accept-Language]]]] 欄を使って[[表現]]を選択したことを表しています。
なお、[[要求]]に実際には [CODE(HTTP)@en[[[Negotiate]]]]
欄が含まれていなくても、[[透過内容折衝]]が行われたことを示すために
[CODE(HTTP)@en[[[Vary]]]] 欄に [Q[[CODE(HTTP)@en[Negotiate]]]]
という値を含めます。
[5] [CITE@en[2.2.3 The WWW-Authorization Request Header]]
( ([TIME[2014-10-22 14:50:31 +09:00]] 版))
<http://msdn.microsoft.com/en-us/library/dd358276.aspx>
[6] [CITE@ja-jp[SharePoint の内部: SharePoint での認証に Kerberos を使用する - TechNet Magazine 2010 年 1 月号]]
( ([TIME[2014-10-22 14:59:33 +09:00]] 版))
<http://technet.microsoft.com/ja-jp/magazine/ee914605.aspx>