1 |
wakaba |
1.1 |
HTTP Working Group Koen Holtman, TUE |
2 |
|
|
Internet-Draft Andrew Mutz, Hewlett-Packard |
3 |
|
|
Expires: March 6, 1997 September 6, 1996 |
4 |
|
|
|
5 |
|
|
|
6 |
|
|
Transparent Content Negotiation in HTTP |
7 |
|
|
|
8 |
|
|
draft-holtman-http-negotiation-03.txt |
9 |
|
|
|
10 |
|
|
(Internal draft version 23) |
11 |
|
|
|
12 |
|
|
STATUS OF THIS MEMO |
13 |
|
|
|
14 |
|
|
|
15 |
|
|
This document is an Internet-Draft. Internet-Drafts are |
16 |
|
|
working documents of the Internet Engineering Task Force |
17 |
|
|
(IETF), its areas, and its working groups. Note that other |
18 |
|
|
groups may also distribute working documents as |
19 |
|
|
Internet-Drafts. |
20 |
|
|
|
21 |
|
|
Internet-Drafts are draft documents valid for a maximum of |
22 |
|
|
six months and may be updated, replaced, or obsoleted by |
23 |
|
|
other documents at any time. It is inappropriate to use |
24 |
|
|
Internet-Drafts as reference material or to cite them other |
25 |
|
|
than as "work in progress". |
26 |
|
|
|
27 |
|
|
To learn the current status of any Internet-Draft, please |
28 |
|
|
check the "1id-abstracts.txt" listing contained in the |
29 |
|
|
Internet-Drafts Shadow Directories on ftp.is.co.za |
30 |
|
|
(Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific |
31 |
|
|
Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US |
32 |
|
|
West Coast). |
33 |
|
|
|
34 |
|
|
Distribution of this document is unlimited. Please send |
35 |
|
|
comments to the HTTP working group at |
36 |
|
|
<http-wg@cuckoo.hpl.hp.com>. Discussions of the working |
37 |
|
|
group are archived at |
38 |
|
|
<URL:http://www.ics.uci.edu/pub/ietf/http/>. General |
39 |
|
|
discussions about HTTP and the applications which use HTTP |
40 |
|
|
should take place on the <www-talk@w3.org> mailing list. |
41 |
|
|
|
42 |
|
|
A HTML version of this document, and versions with change |
43 |
|
|
bars, are available at |
44 |
|
|
<URL:http://gewis.win.tue.nl/~koen/conneg/>. |
45 |
|
|
|
46 |
|
|
|
47 |
|
|
ABSTRACT |
48 |
|
|
|
49 |
|
|
HTTP allows one to put multiple versions of the same |
50 |
|
|
information under a single URL. Transparent content |
51 |
|
|
negotiation is a mechanism, layered on top of HTTP, for |
52 |
|
|
automatically selecting the best version when the URL is |
53 |
|
|
accessed. This enables the smooth deployment of new web data |
54 |
|
|
formats and markup tags. |
55 |
|
|
|
56 |
|
|
Design goals for transparent content negotiation include: low |
57 |
|
|
overhead on the request message size, downwards compatibility, |
58 |
|
|
extensibility, enabling the rapid introduction of new areas of |
59 |
|
|
negotiation, scalability, low cost for minimal support, end |
60 |
|
|
user control, and good cacheability. |
61 |
|
|
|
62 |
|
|
|
63 |
|
|
TABLE OF CONTENTS |
64 |
|
|
|
65 |
|
|
Note: the section numbering is this document is sometimes irregular |
66 |
|
|
because it tries to preserve the numbering in the 02 version as |
67 |
|
|
much as possible. |
68 |
|
|
|
69 |
|
|
1 Introduction |
70 |
|
|
1.1 Background |
71 |
|
|
1.2 Note for readers |
72 |
|
|
1.3 Revision History |
73 |
|
|
|
74 |
|
|
2 Terminology |
75 |
|
|
2.1 Terms from HTTP/1.1 |
76 |
|
|
2.2 New terms |
77 |
|
|
|
78 |
|
|
3 Notation |
79 |
|
|
|
80 |
|
|
4 Overview |
81 |
|
|
4.1 Content negotiation |
82 |
|
|
4.2 HTTP/1.0 style negotiation scheme |
83 |
|
|
4.3 Transparent content negotiation scheme |
84 |
|
|
4.4 Optimizing the negotiation process |
85 |
|
|
4.4B Downwards compatibility with non-negotiating user agents |
86 |
|
|
4.5 Retrieving a variant by hand |
87 |
|
|
4.6 Dimensions of negotiation |
88 |
|
|
4.7 Feature negotiation |
89 |
|
|
|
90 |
|
|
5 Variant descriptions |
91 |
|
|
5.1 Syntax |
92 |
|
|
5.2 URI |
93 |
|
|
5.3 Source-quality |
94 |
|
|
5.4 Type, language, length, and charset. |
95 |
|
|
5.5 Features |
96 |
|
|
5.6 Description |
97 |
|
|
5.7 Extension-attribute |
98 |
|
|
|
99 |
|
|
6 Feature negotiation |
100 |
|
|
6.1 Feature tags |
101 |
|
|
6.2 Accept-Features header |
102 |
|
|
6.3 Feature predicates |
103 |
|
|
6.4 Features attribute |
104 |
|
|
|
105 |
|
|
7 Feature negotiation examples |
106 |
|
|
7.1 Use of feature tags |
107 |
|
|
7.2 Use of numeric feature tags |
108 |
|
|
|
109 |
|
|
8 Feature tag registration |
110 |
|
|
8.1 Evolution of feature tags |
111 |
|
|
8.2 Core set of feature tags |
112 |
|
|
8.3 Feature tag design |
113 |
|
|
|
114 |
|
|
9 Content negotiation response codes and headers |
115 |
|
|
9.1 506 Variant Also Negotiates |
116 |
|
|
9.2 Accept-Features |
117 |
|
|
9.3 Content-Features |
118 |
|
|
9.4 Alternates |
119 |
|
|
9.5 Alternates-Older |
120 |
|
|
9.6 Negotiate |
121 |
|
|
9.7 Variant-Vary |
122 |
|
|
|
123 |
|
|
10 Content negotiation responses |
124 |
|
|
10.1 List response |
125 |
|
|
10.2 Choice response |
126 |
|
|
10.2B Ad hoc response |
127 |
|
|
10.3 Reusing the Alternates header |
128 |
|
|
10.4 Extracting a normal response from a choice response |
129 |
|
|
10.5 Elaborate Vary headers |
130 |
|
|
10.5.1 Construction of an elaborate Vary header |
131 |
|
|
10.5.2 Caching of an elaborate Vary header |
132 |
|
|
|
133 |
|
|
11 The network negotiation algorithm |
134 |
|
|
11.1 Input |
135 |
|
|
11.2 Output |
136 |
|
|
11.2.1 Output for proxies |
137 |
|
|
11.2.2 Output for origin servers |
138 |
|
|
11.2.3 Output for user agents |
139 |
|
|
11.3 Computing the overall quality values |
140 |
|
|
11.4 Definite and speculative quality values |
141 |
|
|
11.5 Determining the result |
142 |
|
|
11.5.1 Result for proxies and origin servers |
143 |
|
|
11.5.2 Result for user agents |
144 |
|
|
11.6 Construction of short requests |
145 |
|
|
|
146 |
|
|
12 User agent support for transparent negotiation |
147 |
|
|
12.1 Handling of responses |
148 |
|
|
12.2 Presentation of a transparently negotiated resource |
149 |
|
|
|
150 |
|
|
13 Origin server support for transparent negotiation |
151 |
|
|
13.1 Requirements |
152 |
|
|
13.2 Negotiation on transactions other than GET and HEAD |
153 |
|
|
|
154 |
|
|
14 Proxy support for transparent negotiation |
155 |
|
|
|
156 |
|
|
15 Security and privacy considerations |
157 |
|
|
15.1 Accept headers revealing information of a private nature |
158 |
|
|
15.2 Spoofing of responses from variant resources |
159 |
|
|
|
160 |
|
|
16 Acknowledgments |
161 |
|
|
|
162 |
|
|
17 References |
163 |
|
|
|
164 |
|
|
18 Author's address |
165 |
|
|
|
166 |
|
|
19 Appendices |
167 |
|
|
19.1 Adding an Expires header to ensure HTTP/1.0 compatibility |
168 |
|
|
19.2 Origin server implementation considerations |
169 |
|
|
19.2.1 Implementation with a CGI script |
170 |
|
|
19.2.2 Direct support by HTTP servers |
171 |
|
|
19.2.3 Web publishing tools |
172 |
|
|
19.3 Open issues in transparent content negotiation |
173 |
|
|
19.3B Server-side rendering engines |
174 |
|
|
19.3C Quality factors in the Accept-Features header |
175 |
|
|
19.4 Other negotiation specifications |
176 |
|
|
19.4.1 User-Agent Display Attributes |
177 |
|
|
19.4.2 HTTP/1.2 Extension Protocol (PEP) |
178 |
|
|
19.5 Related issues |
179 |
|
|
19.5.1 Current negotiation practice |
180 |
|
|
19.5.2 Bandwidth negotiation |
181 |
|
|
|
182 |
|
|
|
183 |
|
|
1 Introduction |
184 |
|
|
|
185 |
|
|
HTTP allows one to put multiple versions of the same information |
186 |
|
|
under a single URI. Each of these versions is called a `variant'. |
187 |
|
|
Transparent content negotiation is a mechanism for automatically |
188 |
|
|
and efficiently retrieving the best variant when a GET or HEAD |
189 |
|
|
request is made. This enables the smooth deployment of new web |
190 |
|
|
data formats and markup tags. |
191 |
|
|
|
192 |
|
|
This specification defines transparent content negotiation as an |
193 |
|
|
extension on top of the HTTP/1.1 protocol [1]. However, use of |
194 |
|
|
this extension does not require use of HTTP/1.1: transparent |
195 |
|
|
content negotiation can also be done if some or all of the parties |
196 |
|
|
are HTTP/1.0 [3] systems. |
197 |
|
|
|
198 |
|
|
Transparent negotiation is called `transparent' because it makes |
199 |
|
|
all variants inside the origin server visible to outside parties. |
200 |
|
|
|
201 |
|
|
|
202 |
|
|
1.1 Background |
203 |
|
|
|
204 |
|
|
The addition of content negotiation to the web infrastructure has |
205 |
|
|
been considered important since the early days of the web. Among |
206 |
|
|
the expected benefits of a sufficiently powerful system for content |
207 |
|
|
negotiation are |
208 |
|
|
|
209 |
|
|
* smooth deployment of new data formats and markup tags will |
210 |
|
|
allow graceful evolution of the web |
211 |
|
|
|
212 |
|
|
* eliminating the need to choose between a `state of the art |
213 |
|
|
multimedia homepage' and one which can be viewed by all web |
214 |
|
|
users |
215 |
|
|
|
216 |
|
|
* enabling good service to a wider range of browsing |
217 |
|
|
platforms (from low-end PDA's to high-end VR setups) |
218 |
|
|
|
219 |
|
|
* eliminating error-prone and cache-unfriendly |
220 |
|
|
User-Agent based negotiation |
221 |
|
|
|
222 |
|
|
* enabling construction of sites without `click here for the X |
223 |
|
|
version' links |
224 |
|
|
|
225 |
|
|
* internationalization, and the ability to offer multi-lingual |
226 |
|
|
content without a bias towards one language. |
227 |
|
|
|
228 |
|
|
The development of content negotiation has been a slow process, |
229 |
|
|
perhaps because the expected benefits are mostly long-term |
230 |
|
|
benefits. Also, all immediately obvious content negotiation |
231 |
|
|
solutions involve sending larger HTTP request messages. Larger |
232 |
|
|
request messages are unacceptable to many people: a small overhead |
233 |
|
|
on the request size is often cited as the main technical |
234 |
|
|
requirement for any scheme which offers the above benefits. |
235 |
|
|
|
236 |
|
|
Therefore, a low overhead on the request message size is one of the |
237 |
|
|
main design goals of this specification. A large fraction of the |
238 |
|
|
text below is devoted to the definition of mechanisms for meeting |
239 |
|
|
this design goal. The desire to provide for good cacheability in |
240 |
|
|
all cases accounts for another considerable part of the content of |
241 |
|
|
this document. |
242 |
|
|
|
243 |
|
|
Other design goals include downwards compatibility, extensibility, |
244 |
|
|
enabling the rapid introduction of new areas of negotiation, |
245 |
|
|
scalability, low cost of minimal support, and end user control. |
246 |
|
|
End user control, the option to manually select a variant if |
247 |
|
|
desired, is the one redeeming quality of the `click here for the X |
248 |
|
|
version' type of negotiation. Preserving this option is considered |
249 |
|
|
important. |
250 |
|
|
|
251 |
|
|
|
252 |
|
|
1.2 Note for readers |
253 |
|
|
|
254 |
|
|
Some sections in this document discuss requirements for proxy |
255 |
|
|
caches only. Implementers of origin servers and user agents (but |
256 |
|
|
not implementers of user agent caches) can skip these sections. |
257 |
|
|
The sections which can be skipped are: |
258 |
|
|
|
259 |
|
|
9.5 Alternates-Older |
260 |
|
|
9.7 Variant-Vary |
261 |
|
|
10.3 Reusing the Alternates header |
262 |
|
|
10.4 Extracting a normal response from a choice response |
263 |
|
|
10.5.2 Caching of an elaborate Vary header |
264 |
|
|
14 Proxy support for transparent negotiation |
265 |
|
|
|
266 |
|
|
The skipping of these sections is also recommended on first |
267 |
|
|
reading. |
268 |
|
|
|
269 |
|
|
1.3 Revision History |
270 |
|
|
|
271 |
|
|
The change bars in this document reflect the changes with respect |
272 |
|
|
to the 02 version of this draft. Major functional changes are: |
273 |
|
|
|
274 |
|
|
- Non-numeric feature tags were introduced. |
275 |
|
|
|
276 |
|
|
- Ad-hoc responses were introduced to address the compatibility |
277 |
|
|
considerations for 300 responses, the List_OS result of the |
278 |
|
|
network negotiation algorithm and the "forward" directive of the |
279 |
|
|
alternates header were removed accordingly. |
280 |
|
|
|
281 |
|
|
- The Accept-Features header has been made extensible |
282 |
|
|
|
283 |
|
|
Major changes in the presentation are: |
284 |
|
|
|
285 |
|
|
- The appendix discussing content transformation has been removed. |
286 |
|
|
|
287 |
|
|
- Appendices 19.3B and 19.3C were added, appendix 19.2 was written. |
288 |
|
|
|
289 |
|
|
- The relation to HTTP/1.0 systems and to non-negotiating user |
290 |
|
|
agents has been made more clear. |
291 |
|
|
|
292 |
|
|
- Some new explanatory material was added. |
293 |
|
|
|
294 |
|
|
Finally, this version includes many grammatical and stylistic |
295 |
|
|
corrections. |
296 |
|
|
|
297 |
|
|
In the version of this document with change bars, all changes are |
298 |
|
|
marked except changes in formatting and punctuation. |
299 |
|
|
|
300 |
|
|
|
301 |
|
|
2 Terminology |
302 |
|
|
|
303 |
|
|
2.1 Terms from HTTP/1.1 |
304 |
|
|
|
305 |
|
|
This specification mostly uses the terminology of the HTTP/1.1 |
306 |
|
|
specification [1]. The definitions below were reproduced from [1]. |
307 |
|
|
|
308 |
|
|
request |
309 |
|
|
An HTTP request message. |
310 |
|
|
|
311 |
|
|
response |
312 |
|
|
An HTTP response message. |
313 |
|
|
|
314 |
|
|
resource |
315 |
|
|
A network data object or service that can be identified by a URI. |
316 |
|
|
Resources may be available in multiple representations |
317 |
|
|
(e.g. multiple languages, data formats, size, resolutions) or |
318 |
|
|
vary in other ways. |
319 |
|
|
|
320 |
|
|
content negotiation |
321 |
|
|
The mechanism for selecting the appropriate representation when |
322 |
|
|
servicing a request. |
323 |
|
|
|
324 |
|
|
variant |
325 |
|
|
A resource may have one, or more than one, representation(s) |
326 |
|
|
associated with it at any given instant. Each of these |
327 |
|
|
representations is termed a `variant.' Use of the term `variant' |
328 |
|
|
does not necessarily imply that the resource is subject to |
329 |
|
|
content negotiation. |
330 |
|
|
|
331 |
|
|
client |
332 |
|
|
A program that establishes connections for the purpose of sending |
333 |
|
|
requests. |
334 |
|
|
|
335 |
|
|
user agent |
336 |
|
|
The client which initiates a request. These are often browsers, |
337 |
|
|
editors, spiders (web-traversing robots), or other end user |
338 |
|
|
tools. |
339 |
|
|
|
340 |
|
|
server |
341 |
|
|
An application program that accepts connections in order to |
342 |
|
|
service requests by sending back responses. Any given program may |
343 |
|
|
be capable of being both a client and a server; our use of these |
344 |
|
|
terms refers only to the role being performed by the program for |
345 |
|
|
a particular connection, rather than to the program's |
346 |
|
|
capabilities in general. Likewise, any server may act as an |
347 |
|
|
origin server, proxy, gateway, or tunnel, switching behavior |
348 |
|
|
based on the nature of each request. |
349 |
|
|
|
350 |
|
|
origin server |
351 |
|
|
The server on which a given resource resides or is to be created. |
352 |
|
|
|
353 |
|
|
proxy |
354 |
|
|
An intermediary program which acts as both a server and a client |
355 |
|
|
for the purpose of making requests on behalf of other |
356 |
|
|
clients. Requests are serviced internally or by passing them on, |
357 |
|
|
with possible translation, to other servers. A proxy must |
358 |
|
|
implement both the client and server requirements of this |
359 |
|
|
specification. |
360 |
|
|
|
361 |
|
|
first-hand |
362 |
|
|
A response is first-hand if it comes directly and without |
363 |
|
|
unnecessary delay from the origin server, perhaps via one or more |
364 |
|
|
proxies. A response is also first-hand if its validity has just |
365 |
|
|
been checked directly with the origin server. |
366 |
|
|
|
367 |
|
|
age |
368 |
|
|
The age of a response is the time since it was sent by, or |
369 |
|
|
successfully validated with, the origin server. |
370 |
|
|
|
371 |
|
|
fresh |
372 |
|
|
A response is fresh if its age has not yet exceeded its freshness |
373 |
|
|
lifetime. |
374 |
|
|
|
375 |
|
|
2.2 New terms |
376 |
|
|
|
377 |
|
|
transparently negotiable resource |
378 |
|
|
A resource which supports transparent content negotiation. A |
379 |
|
|
transparently negotiable resource always has a variant list bound |
380 |
|
|
to it, usually represented as an Alternates header. |
381 |
|
|
|
382 |
|
|
variant list |
383 |
|
|
The list of variants bound to a transparently negotiable |
384 |
|
|
resource. |
385 |
|
|
|
386 |
|
|
variant description |
387 |
|
|
A machine-readable description of a variant, usually found in a |
388 |
|
|
variant list. A variant description contains the variant |
389 |
|
|
resource URI and various attributes which describe properties of |
390 |
|
|
the variant. Variant descriptions are defined in Section 5. |
391 |
|
|
|
392 |
|
|
variant resource |
393 |
|
|
A resource from which a variant of a negotiable resource can be |
394 |
|
|
retrieved with a simple GET request. |
395 |
|
|
|
396 |
|
|
list response |
397 |
|
|
A list response contains the variant list of the negotiable |
398 |
|
|
resource, but no variant data. It is generated when the server |
399 |
|
|
does not (perhaps cannot) choose a particular best variant for the |
400 |
|
|
request. List responses are defined in Section 10.1. |
401 |
|
|
|
402 |
|
|
choice response |
403 |
|
|
A choice response contains both the variant list of the |
404 |
|
|
negotiable resource and a representation of the best variant for |
405 |
|
|
the request. Choice responses are defined in Section 10.2. |
406 |
|
|
|
407 |
|
|
ad hoc response |
408 |
|
|
An ad hoc response contains the variant list of the negotiable |
409 |
|
|
resource, and any other data the origin server wants to send. It |
410 |
|
|
can be generated as a response to a non-negotiating user agent if |
411 |
|
|
the server does not (perhaps cannot) choose any particular |
412 |
|
|
variant. Ad hoc responses are defined in Section 10.2B. |
413 |
|
|
|
414 |
|
|
normal response |
415 |
|
|
A HTTP response which is not a list response, choice response, or |
416 |
|
|
ad hoc response. Normal responses are never generated by |
417 |
|
|
transparently negotiable resources, and are always generated by |
418 |
|
|
variant resources. |
419 |
|
|
|
420 |
|
|
Accept headers |
421 |
|
|
The request headers: Accept, Accept-Charset, Accept-Language, and |
422 |
|
|
Accept-Features. |
423 |
|
|
|
424 |
|
|
network negotiation algorithm |
425 |
|
|
A standardized algorithm by which a party in the negotiation |
426 |
|
|
process can choose a best variant on behalf of another party. |
427 |
|
|
The algorithm computes whether the Accept headers in the request |
428 |
|
|
contain sufficient information to allow a choice, and if so, |
429 |
|
|
which variant must be chosen. The network negotiation algorithm |
430 |
|
|
is defined in Section 11. |
431 |
|
|
|
432 |
|
|
neighbor |
433 |
|
|
Two resources are called neighbors if the absolute URI of the |
434 |
|
|
first resource up to its last slash equals the absolute URI of |
435 |
|
|
the second resource up to its last slash. The neighboring |
436 |
|
|
relation is important because of security considerations; see |
437 |
|
|
Section 15.2. |
438 |
|
|
|
439 |
|
|
[##Historical note: In the context of old versions of the HTTP/1.1 |
440 |
|
|
specification like [2], list responses can be called `pre-emptive |
441 |
|
|
negotiation responses', and choice responses can be called |
442 |
|
|
`reactive negotiation responses'.##] |
443 |
|
|
|
444 |
|
|
[##Note: In the context of the HTTP/1.1 specification [1], both |
445 |
|
|
list and choice responses are the result of server-driven |
446 |
|
|
negotiation, though a list response is a server-driven negotiation |
447 |
|
|
response meant to initiate agent-driven negotiation.##] |
448 |
|
|
|
449 |
|
|
|
450 |
|
|
3 Notation |
451 |
|
|
|
452 |
|
|
The notation [## ... ##] in this document encloses an editorial |
453 |
|
|
comment. Such a comment will be either removed or replaced by real |
454 |
|
|
text in the final version of this document. |
455 |
|
|
|
456 |
|
|
The version of BNF used in this document is taken from [1], and |
457 |
|
|
many of the nonterminals used are defined in [1]. |
458 |
|
|
|
459 |
|
|
One new BNF construct is added: |
460 |
|
|
|
461 |
|
|
1%rule |
462 |
|
|
|
463 |
|
|
stands for one or more instances of "rule", separated by |
464 |
|
|
whitespace: |
465 |
|
|
|
466 |
|
|
1%rule = rule *( 1*LWS rule ) |
467 |
|
|
|
468 |
|
|
|
469 |
|
|
4 Overview |
470 |
|
|
|
471 |
|
|
This section gives an overview of transparent content negotiation. |
472 |
|
|
It starts with a more general discussion of negotiation as provided |
473 |
|
|
by HTTP. |
474 |
|
|
|
475 |
|
|
|
476 |
|
|
4.1 Content negotiation |
477 |
|
|
|
478 |
|
|
HTTP/1.1 allows one to put multiple versions of the same |
479 |
|
|
information under a single resource URI. Each of these versions is |
480 |
|
|
called a `variant'. For example, a resource http://x.org/paper |
481 |
|
|
could bind to three different variants of a paper: |
482 |
|
|
|
483 |
|
|
1. HTML, English |
484 |
|
|
2. HTML, French |
485 |
|
|
3. Postscript, English |
486 |
|
|
|
487 |
|
|
Content negotiation is the process by which the best variant is |
488 |
|
|
selected if the resource is accessed. The selection is done by |
489 |
|
|
matching the properties of the available variants to the |
490 |
|
|
capabilities of the user agent and the preferences of the user. |
491 |
|
|
|
492 |
|
|
It has always been possible under HTTP to have multiple |
493 |
|
|
representations available for one resource, and to return the most |
494 |
|
|
appropriate representation for each subsequent request. |
495 |
|
|
HTTP/1.1 is the first version of HTTP which has provisions for |
496 |
|
|
doing this in a cache-friendly way. These provisions include the |
497 |
|
|
Vary response header, entity tags, and the If-None-Match request |
498 |
|
|
header. |
499 |
|
|
|
500 |
|
|
|
501 |
|
|
4.2 HTTP/1.0 style negotiation scheme |
502 |
|
|
|
503 |
|
|
The HTTP/1.0 protocol elements allow for a negotiation scheme as |
504 |
|
|
follows: |
505 |
|
|
|
506 |
|
|
Server _____ proxy _____ proxy _____ user |
507 |
|
|
x.org cache cache agent |
508 |
|
|
|
509 |
|
|
< ---------------------------------- |
510 |
|
|
| GET http://x.org/paper |
511 |
|
|
| Accept headers |
512 |
|
|
choose |
513 |
|
|
| |
514 |
|
|
---------------------------------- > |
515 |
|
|
Best variant |
516 |
|
|
|
517 |
|
|
When the resource is accessed, the user agent sends (along with its |
518 |
|
|
request) various Accept headers which express the user agent |
519 |
|
|
capabilities and the user preferences. Then the origin server uses |
520 |
|
|
these Accept headers to choose the best variant, which is returned |
521 |
|
|
in the response. |
522 |
|
|
|
523 |
|
|
The biggest problem with this scheme is that it does not scale |
524 |
|
|
well. For all but the most minimal user agents, Accept headers |
525 |
|
|
expressing all capabilities and preferences would be very large, |
526 |
|
|
and sending them in every request would be hugely inefficient, in |
527 |
|
|
particular because only a small fraction of the resources on the |
528 |
|
|
web have multiple variants. |
529 |
|
|
|
530 |
|
|
|
531 |
|
|
4.3 Transparent content negotiation scheme |
532 |
|
|
|
533 |
|
|
The transparent negotiation scheme eliminates the need to send huge |
534 |
|
|
Accept headers, and nevertheless allows for a selection process |
535 |
|
|
that always yields either the best variant, or an error message |
536 |
|
|
indicating that user agent is not capable of displaying any of the |
537 |
|
|
available variants. |
538 |
|
|
|
539 |
|
|
Under the transparent content negotiation scheme, the server sends |
540 |
|
|
a list with the available variants and their properties to the user |
541 |
|
|
agent. An example of a list with three variants is |
542 |
|
|
|
543 |
|
|
{"paper.html.en" 0.9 {type text/html} {language en}}, |
544 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
545 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} {language en}} |
546 |
|
|
|
547 |
|
|
The syntax and semantics of the variant descriptions in this list |
548 |
|
|
are covered in depth in Section 5. When the list is received, the |
549 |
|
|
user agent can choose the best variant and retrieve it. |
550 |
|
|
Graphically, the communication can be represented as follows: |
551 |
|
|
|
552 |
|
|
Server _____ proxy _____ proxy _____ user |
553 |
|
|
x.org cache cache agent |
554 |
|
|
|
555 |
|
|
< ---------------------------------- |
556 |
|
|
| GET http://x.org/paper |
557 |
|
|
| |
558 |
|
|
----------------------------------- > [list response] |
559 |
|
|
return of list | |
560 |
|
|
choose |
561 |
|
|
| |
562 |
|
|
< ---------------------------------- |
563 |
|
|
| GET http://x.org/paper.html.en |
564 |
|
|
| |
565 |
|
|
---------------------------------- > [normal response] |
566 |
|
|
return of html.en |
567 |
|
|
|
568 |
|
|
The first response returning the list of variants is called a `list |
569 |
|
|
response'. The second response is a normal HTTP response: it does |
570 |
|
|
not contain special content negotiation related information. Only |
571 |
|
|
the user agent needs to know that the second request actually |
572 |
|
|
retrieves a variant, for the other parties in the communication, |
573 |
|
|
the second transaction is indistinguishable from a normal HTTP |
574 |
|
|
transaction. |
575 |
|
|
|
576 |
|
|
With this scheme, information about capabilities and user |
577 |
|
|
preferences is only used by the user agent itself. Therefore, |
578 |
|
|
sending such information in large Accept headers is unnecessary. |
579 |
|
|
Accept headers do have a limited use in transparent content |
580 |
|
|
negotiation however; the sending of small Accept headers can often |
581 |
|
|
speed up the negotiation process. This is covered in Section 4.4. |
582 |
|
|
|
583 |
|
|
List responses are covered in depth in Section 10.1. As an |
584 |
|
|
example, the list response in the above picture could be: |
585 |
|
|
|
586 |
|
|
HTTP/1.1 300 Multiple Choices |
587 |
|
|
Date: Tue, 11 Jun 1996 19:39:48 GMT |
588 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
589 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
590 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
591 |
|
|
{language en}} |
592 |
|
|
Vary: * |
593 |
|
|
Content-Type: text/html |
594 |
|
|
Content-Length: 227 |
595 |
|
|
|
596 |
|
|
<h2>Multiple Choices:</h2> |
597 |
|
|
<ul> |
598 |
|
|
<li><a href=paper.html.en>HTML, English version</a> |
599 |
|
|
<li><a href=paper.html.fr>HTML, French version</a> |
600 |
|
|
<li><a href=paper.ps.en>Postscript, English version</a> |
601 |
|
|
</ul> |
602 |
|
|
|
603 |
|
|
The HTML entity included in the response allows the user to select |
604 |
|
|
the best variant by hand if desired. |
605 |
|
|
|
606 |
|
|
|
607 |
|
|
4.4 Optimizing the negotiation process |
608 |
|
|
|
609 |
|
|
The basic transparent negotiation scheme involves two HTTP |
610 |
|
|
transactions: one to retrieve the list, and a second one to retrieve |
611 |
|
|
the chosen variant. There are however several ways to `cut corners' |
612 |
|
|
in the data flow path of the basic scheme. |
613 |
|
|
|
614 |
|
|
First, caching proxies can cache both variant lists and complete |
615 |
|
|
responses. Such caching can reduce the communication overhead, as |
616 |
|
|
shown in the following example: |
617 |
|
|
|
618 |
|
|
Server _____ proxy _____ proxy __________ user |
619 |
|
|
x.org cache cache agent |
620 |
|
|
|
621 |
|
|
< -------------- |
622 |
|
|
| GET ../paper |
623 |
|
|
| |
624 |
|
|
has the list |
625 |
|
|
in cache |
626 |
|
|
| |
627 |
|
|
------------- > [list response] |
628 |
|
|
list | |
629 |
|
|
| |
630 |
|
|
choose |
631 |
|
|
| |
632 |
|
|
< -------------------------- |
633 |
|
|
| GET ../paper.html.en |
634 |
|
|
| |
635 |
|
|
has the variant |
636 |
|
|
in cache |
637 |
|
|
| |
638 |
|
|
-------------------------- > [normal response] |
639 |
|
|
return of html.en |
640 |
|
|
|
641 |
|
|
Second, the user agent can send small Accept headers which could |
642 |
|
|
allow a server to determine the choice the user agent would make on |
643 |
|
|
receiving the list. If the Accept headers contain enough |
644 |
|
|
information, the origin server can send back the variant directly: |
645 |
|
|
|
646 |
|
|
Server _____ proxy _____ proxy _____ user |
647 |
|
|
x.org cache cache agent |
648 |
|
|
|
649 |
|
|
< ---------------------------------- |
650 |
|
|
| GET http://x.org/paper |
651 |
|
|
| small Accept headers |
652 |
|
|
| |
653 |
|
|
able to choose on |
654 |
|
|
behalf of user agent |
655 |
|
|
| |
656 |
|
|
---------------------------------- > [choice response] |
657 |
|
|
return of html.en and list |
658 |
|
|
|
659 |
|
|
This choosing based on small accept headers can be done with the |
660 |
|
|
network negotiation algorithm (Section 11). This algorithm takes |
661 |
|
|
the variant list and the Accept headers as input. It computes |
662 |
|
|
whether the Accept headers contain sufficient information to choose |
663 |
|
|
on behalf of the user agent, and if so, which variant must be |
664 |
|
|
chosen. |
665 |
|
|
|
666 |
|
|
The response in the above diagram is called a choice response. It |
667 |
|
|
transmits both the chosen variant and the list of all variants |
668 |
|
|
bound to the negotiable resource. Choice responses are covered in |
669 |
|
|
depth in Section 10.2. For example, the choice response in the |
670 |
|
|
above picture could be: |
671 |
|
|
|
672 |
|
|
HTTP/1.1 200 OK |
673 |
|
|
Date: Tue, 11 Jun 1996 19:39:54 GMT |
674 |
|
|
Content-Type: text/html |
675 |
|
|
Content-Length: 5327 |
676 |
|
|
Content-Location: paper.html.en |
677 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
678 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
679 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
680 |
|
|
{language en}} |
681 |
|
|
Vary: * |
682 |
|
|
|
683 |
|
|
<title>A paper about .... |
684 |
|
|
|
685 |
|
|
Finally, the above two kinds of optimization can be combined; a |
686 |
|
|
caching proxy which has the list will sometimes be able to choose on |
687 |
|
|
behalf of the user agent. This could lead to the following |
688 |
|
|
communication pattern: |
689 |
|
|
|
690 |
|
|
Server _____ proxy _____ proxy __________ user |
691 |
|
|
x.org cache cache agent |
692 |
|
|
|
693 |
|
|
< --------------- |
694 |
|
|
| GET ../paper |
695 |
|
|
| small Accept |
696 |
|
|
| |
697 |
|
|
able to choose |
698 |
|
|
on behalf |
699 |
|
|
| |
700 |
|
|
< ---------- |
701 |
|
|
| GET ../paper.html.en |
702 |
|
|
| |
703 |
|
|
---------- > [normal response] |
704 |
|
|
html.en | |
705 |
|
|
---------------- > [choice response] |
706 |
|
|
html.en and list |
707 |
|
|
|
708 |
|
|
In this case the proxy cache nearest to the user agent has |
709 |
|
|
a cached variant list, and chooses on behalf of the user agent. |
710 |
|
|
|
711 |
|
|
Note that this cutting of corners does not only save bandwidth. It |
712 |
|
|
also eliminates delays due to packet round trip times, and reduces |
713 |
|
|
the load on the origin server. |
714 |
|
|
|
715 |
|
|
|
716 |
|
|
4.4B Downwards compatibility with non-negotiating user agents |
717 |
|
|
|
718 |
|
|
To handle requests from user agents not capable of transparent |
719 |
|
|
content negotiation, transparent content negotiation basically |
720 |
|
|
reverts to a HTTP/1.0 style negotiation scheme. One optimization |
721 |
|
|
remaining is that proxy caches may sometimes be able to perform |
722 |
|
|
HTTP/1.0 style negotiation on behalf of the origin server. |
723 |
|
|
|
724 |
|
|
|
725 |
|
|
4.5 Retrieving a variant by hand |
726 |
|
|
|
727 |
|
|
If a transparently negotiated resource is accessed, the user agent |
728 |
|
|
will always at some point receive the list of available variants. |
729 |
|
|
The user agent can use this list to make available a menu (in HTML or |
730 |
|
|
not) of all variants and their characteristics to the user. |
731 |
|
|
Such a menu can allow the user to randomly browse other variants, |
732 |
|
|
and can make it possible to manually correct any sub-optimal |
733 |
|
|
choice made by the automatic negotiation process. |
734 |
|
|
|
735 |
|
|
|
736 |
|
|
4.6 Dimensions of negotiation |
737 |
|
|
|
738 |
|
|
Transparent content negotiation defines four dimensions of |
739 |
|
|
negotiation: |
740 |
|
|
|
741 |
|
|
1. Media type (MIME type) |
742 |
|
|
2. Charset |
743 |
|
|
3. Language |
744 |
|
|
4. Features |
745 |
|
|
|
746 |
|
|
The first three dimensions have traditionally been present in HTTP. |
747 |
|
|
The fourth dimension is added by this specification. Additional |
748 |
|
|
dimensions, beyond the four mentioned above, could be added by |
749 |
|
|
future specifications. |
750 |
|
|
|
751 |
|
|
Negotiation on the content encoding of a response (gzipped, |
752 |
|
|
compressed, etc.) is left outside of the realm of transparent |
753 |
|
|
negotiation. Transparent negotiation does not prohibit proxies to |
754 |
|
|
encode or decode a relayed or cached response on the fly: the |
755 |
|
|
response still contains the same variant as far as transparent |
756 |
|
|
content negotiation is concerned. |
757 |
|
|
|
758 |
|
|
|
759 |
|
|
4.7 Feature negotiation |
760 |
|
|
|
761 |
|
|
Feature negotiation intends to provide for all areas of negotiation |
762 |
|
|
not covered by the type, charset, and language dimensions. |
763 |
|
|
Examples are negotiation on |
764 |
|
|
|
765 |
|
|
* HTML extensions |
766 |
|
|
* Extensions of other media types |
767 |
|
|
* Color capabilities of the user agent |
768 |
|
|
* Screen size |
769 |
|
|
* Output medium (screen, paper, ...) |
770 |
|
|
* Preference for speed vs. preference for graphical detail |
771 |
|
|
|
772 |
|
|
The feature negotiation framework is the principal means by which |
773 |
|
|
transparent negotiation offers extensibility; a new dimension of |
774 |
|
|
negotiation (really a sub-dimension of the feature dimension) can be |
775 |
|
|
added without the need for a new standards effort by the simple |
776 |
|
|
registration of a `feature tag'. Feature registration is discussed |
777 |
|
|
in section 8. |
778 |
|
|
|
779 |
|
|
|
780 |
|
|
5 Variant descriptions |
781 |
|
|
|
782 |
|
|
5.1 Syntax |
783 |
|
|
|
784 |
|
|
A variant can be described in a machine-readable way with a variant |
785 |
|
|
description. |
786 |
|
|
|
787 |
|
|
variant-description = |
788 |
|
|
"{" <"> URI <"> source-quality *variant-attribute "}" |
789 |
|
|
|
790 |
|
|
source-quality = qvalue |
791 |
|
|
|
792 |
|
|
variant-attribute = "{" "type" media-type "}" |
793 |
|
|
| "{" "charset" charset "}" |
794 |
|
|
| "{" "language" 1#language-tag "}" |
795 |
|
|
| "{" "length" 1*DIGIT "}" |
796 |
|
|
| "{" "features" feature-list "}" |
797 |
|
|
| "{" "description" quoted-string "}" |
798 |
|
|
| extension-attribute |
799 |
|
|
|
800 |
|
|
extension-attribute = "{" extension-name extension-value "}" |
801 |
|
|
extension-name = token |
802 |
|
|
extension-value = *( token | quoted-string | LWS |
803 |
|
|
| extension-specials ) |
804 |
|
|
|
805 |
|
|
extension-specials = <any element of tspecials except <"> and "}"> |
806 |
|
|
|
807 |
|
|
Examples are |
808 |
|
|
|
809 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}} |
810 |
|
|
|
811 |
|
|
{"paper.html.tables" 0.9 {type text/html} {features tables}} |
812 |
|
|
|
813 |
|
|
The various attributes which can be present in a variant |
814 |
|
|
description are covered in the subsections below. Each attribute |
815 |
|
|
may appear only once in a variant description. |
816 |
|
|
|
817 |
|
|
|
818 |
|
|
5.2 URI |
819 |
|
|
|
820 |
|
|
The URI attribute gives the URI of the resource from which the |
821 |
|
|
variant can be retrieved with a GET request. It can be absolute or |
822 |
|
|
relative to the Request-URI. The variant resource may vary (on the |
823 |
|
|
Cookie request header, for example), but must not engage in |
824 |
|
|
transparent content negotiation itself. |
825 |
|
|
|
826 |
|
|
|
827 |
|
|
5.3 Source-quality |
828 |
|
|
|
829 |
|
|
The source-quality attribute gives the quality of the variant, as a |
830 |
|
|
representation of the negotiable resource, when this variant is |
831 |
|
|
rendered with a perfect rendering engine on the best possible |
832 |
|
|
output medium. |
833 |
|
|
|
834 |
|
|
If the source-quality is less than 1, it often expresses a quality |
835 |
|
|
degradation caused by a lossy conversion to a particular data |
836 |
|
|
format. For example, a picture originally in JPEG form would have |
837 |
|
|
a lower source quality when translated to the XBM format, and a |
838 |
|
|
much lower source quality when translated to an ASCII-art variant. |
839 |
|
|
Note however, that degradation is a function of the source; an |
840 |
|
|
original piece of ASCII-art may degrade in quality if it is |
841 |
|
|
captured in JPEG form. |
842 |
|
|
|
843 |
|
|
The source-quality could also represent a level of quality |
844 |
|
|
caused by skill of language translation, ability of a feature |
845 |
|
|
set to capture an artistic expression, or clarity of mathematical |
846 |
|
|
expression using a particular character set. |
847 |
|
|
|
848 |
|
|
It is important that content providers do not assign very low |
849 |
|
|
source quality values without good reason, as this would limit the |
850 |
|
|
ability of users to influence the negotiation process with their |
851 |
|
|
own preference settings. The following table should be used as a |
852 |
|
|
guide when assigning source quality values: |
853 |
|
|
|
854 |
|
|
1.000 perfect representation |
855 |
|
|
0.999-0.900 near threshold of noticeable loss of quality |
856 |
|
|
0.899-0.700 noticeable, but acceptable quality reduction |
857 |
|
|
0.699-0.500 barely acceptable quality |
858 |
|
|
0.499-0.000 unacceptable degradation |
859 |
|
|
|
860 |
|
|
When assigning source-quality values, content providers must not |
861 |
|
|
account for the size of the variant and its impact on transmission |
862 |
|
|
and rendering delays. Source-quality values are assigned assuming |
863 |
|
|
instantaneous transmission and rendering. This rule ensures that a |
864 |
|
|
future mechanism for bandwidth negotiation (see Appendix 19.5.2) |
865 |
|
|
can be cleanly added. |
866 |
|
|
|
867 |
|
|
|
868 |
|
|
5.4 Type, language, length, and charset. |
869 |
|
|
|
870 |
|
|
The type, language, and length attributes of a variant description |
871 |
|
|
can carry the same information as their Content-* response header |
872 |
|
|
counterparts as defined in [1]. The counterpart of the charset |
873 |
|
|
attribute is the charset parameter which can be present in the |
874 |
|
|
Content-Type response header, for example |
875 |
|
|
|
876 |
|
|
Content-Type: text/html; charset=ISO-8859-4 |
877 |
|
|
|
878 |
|
|
Though all of these attributes are optional, it is often desirable |
879 |
|
|
to include as many attributes as possible as this will increase the |
880 |
|
|
quality of the negotiation process. |
881 |
|
|
|
882 |
|
|
The length attribute (if present) must reflect the length of the |
883 |
|
|
variant alone, and not the sum of the lengths of the variant and |
884 |
|
|
any objects inlined or embedded by the variant. |
885 |
|
|
|
886 |
|
|
Note: A server is not required to maintain a one-to-one |
887 |
|
|
correspondence between attributes in the description of a |
888 |
|
|
variant and the Content-* headers in responses containing that |
889 |
|
|
variant. Examples: If the variant description contains a |
890 |
|
|
language attribute, the response does not necessarily have to |
891 |
|
|
contain a Content-Language header. If a Content-Language |
892 |
|
|
header is present, it does not have to contain an exact copy of |
893 |
|
|
the information in the language attribute. |
894 |
|
|
|
895 |
|
|
|
896 |
|
|
5.5 Features |
897 |
|
|
|
898 |
|
|
The features attribute specifies how the presence or absence of |
899 |
|
|
particular features in the user agent affects the overall quality of |
900 |
|
|
the variant. This attribute is covered in Section 6.4. |
901 |
|
|
|
902 |
|
|
|
903 |
|
|
5.6 Description |
904 |
|
|
|
905 |
|
|
The description attribute is meant to provide a textual description |
906 |
|
|
of the variant, to be displayed by a user agent when showing a menu |
907 |
|
|
of available variants (Section 12.2). This attribute can be |
908 |
|
|
included if the URI and normal attributes of a variant are |
909 |
|
|
considered too opaque to allow interpretation by the user. |
910 |
|
|
|
911 |
|
|
|
912 |
|
|
5.7 Extension-attribute |
913 |
|
|
|
914 |
|
|
The extension-attribute allows future specifications to |
915 |
|
|
incrementally define new dimensions of negotiation, and eases |
916 |
|
|
content negotiation experiments under HTTP/1.1. In experimental |
917 |
|
|
situations, servers must only generate extension-attributes whose |
918 |
|
|
names start with "x-". User agents should ignore all extension |
919 |
|
|
attributes they do not recognize. Proxies must not run the network |
920 |
|
|
negotiation algorithm if an unknown extension attribute is present |
921 |
|
|
in the variant list. |
922 |
|
|
|
923 |
|
|
|
924 |
|
|
6 Feature negotiation |
925 |
|
|
|
926 |
|
|
Feature negotiation has been introduced in Section 4.7. This |
927 |
|
|
section defines the feature negotiation mechanism. Section 7 |
928 |
|
|
contains examples of its use. |
929 |
|
|
|
930 |
|
|
|
931 |
|
|
6.1 Feature tags |
932 |
|
|
|
933 |
|
|
A feature tag (ftag) identifies a capability of a user agent or a |
934 |
|
|
preference of a user. A feature is said to be `present' in a user |
935 |
|
|
agent if the corresponding capability is implemented, or if the |
936 |
|
|
user has expressed corresponding preference. |
937 |
|
|
|
938 |
|
|
ftag = 1*<any CHAR except CTLs or tspecials or "!"> |
939 |
|
|
|
940 |
|
|
tspecials = "(" | ")" | "<" | ">" | "@" |
941 |
|
|
| "," | ";" | ":" | "\" | <"> |
942 |
|
|
| "/" | "[" | "]" | "?" | "=" |
943 |
|
|
| "{" | "}" | SP | HT |
944 |
|
|
|
945 |
|
|
(tspecials definition reproduced from [1]) |
946 |
|
|
|
947 |
|
|
Examples are |
948 |
|
|
|
949 |
|
|
tables, fonts, blebber, wolx, screenwidth, colordepth |
950 |
|
|
|
951 |
|
|
An example of the use of feature tags in a variant description is: |
952 |
|
|
|
953 |
|
|
{"index.html" 1.0 {type text/html} {features tables frames}} |
954 |
|
|
|
955 |
|
|
Feature-tags are case-insensitive. The definition of a feature tag |
956 |
|
|
may state that a feature tag, if present, can have associated with |
957 |
|
|
it one or more values which reflect a particular capability or |
958 |
|
|
preference. For example, a feature tag `paper' could be present |
959 |
|
|
with the values `A4' and `A5'. |
960 |
|
|
|
961 |
|
|
Note that context may determine whether a feature tag expresses a |
962 |
|
|
capability or a preference. The `textonly' tag is naturally |
963 |
|
|
present for a text-only browser, but the user of a graphical |
964 |
|
|
browser could set the tag to be present if text-only content is |
965 |
|
|
preferred to graphical content. |
966 |
|
|
|
967 |
|
|
As feature registration will be an ongoing process, it is generally |
968 |
|
|
not possible for a user agent to know the meaning of all feature |
969 |
|
|
tags it can possibly encounter in a variant description. A user |
970 |
|
|
agent should treat all features with tags unknown to it as absent. |
971 |
|
|
|
972 |
|
|
6.2 Accept-Features header |
973 |
|
|
|
974 |
|
|
The Accept-Features request header can be used by a client to give |
975 |
|
|
information about the presence or absence of certain features. |
976 |
|
|
|
977 |
|
|
Accept-Features = "Accept-Features" ":" |
978 |
|
|
#( feature-expr *( ";" feature-extension ) ) |
979 |
|
|
|
980 |
|
|
feature-expr = [ "!" ] ftag [ "=" value ] |
981 |
|
|
| ftag "=" "{" value "}" |
982 |
|
|
| ftag "<=" number |
983 |
|
|
| "*" |
984 |
|
|
|
985 |
|
|
value = token |
986 |
|
|
|
987 |
|
|
number = 1*DIGIT |
988 |
|
|
|
989 |
|
|
feature-extension = token [ "=" ( token | quoted-string ) ] |
990 |
|
|
|
991 |
|
|
The value tokens are case-insensitive. No feature extensions are |
992 |
|
|
defined in this specification. An example is: |
993 |
|
|
|
994 |
|
|
Accept-Features: blex, !blebber, colordepth<=5, !screenwidth, |
995 |
|
|
UA-media={stationary}, paper=a4, !paper=a0, * |
996 |
|
|
|
997 |
|
|
The different feature expressions have the following meaning: |
998 |
|
|
|
999 |
|
|
ftag ftag is present |
1000 |
|
|
|
1001 |
|
|
!ftag ftag is absent |
1002 |
|
|
|
1003 |
|
|
ftag=V ftag is present with the value V |
1004 |
|
|
|
1005 |
|
|
!ftag=V ftag is present, but not with the value V |
1006 |
|
|
|
1007 |
|
|
ftag={V} ftag is present with the value V, and not with any |
1008 |
|
|
other values |
1009 |
|
|
|
1010 |
|
|
ftag<=N ftag is present with the numeric values from 0 up to |
1011 |
|
|
and including N, and not with any other values |
1012 |
|
|
|
1013 |
|
|
* makes true all feature predicates (Section 6.3) which |
1014 |
|
|
were not assigned truth values by other elements of the |
1015 |
|
|
header |
1016 |
|
|
|
1017 |
|
|
Absence of the Accept-Features header in a request is equivalent to |
1018 |
|
|
the inclusion of |
1019 |
|
|
|
1020 |
|
|
Accept-Features: * |
1021 |
|
|
|
1022 |
|
|
[##Note: One possible use of the feature-extensions would be the |
1023 |
|
|
introduction of quality values on feature tags, see Appendix |
1024 |
|
|
19.3C##] |
1025 |
|
|
|
1026 |
|
|
|
1027 |
|
|
6.3 Feature predicates |
1028 |
|
|
|
1029 |
|
|
Feature predicates are used in the features attribute of a variant |
1030 |
|
|
description. |
1031 |
|
|
|
1032 |
|
|
fpred = [ "!" ] ftag [ "=" value ] |
1033 |
|
|
|
1034 |
|
|
Examples feature predicates are |
1035 |
|
|
|
1036 |
|
|
blebber, !blebber, paper=a4, colordepth=5, !blex=54 |
1037 |
|
|
|
1038 |
|
|
The network negotiation algorithm can compute the truth value of a |
1039 |
|
|
feature predicate by using the contents of the Accept-Features |
1040 |
|
|
header of the current request. |
1041 |
|
|
|
1042 |
|
|
The truth value of a predicate is assigned as follows, depending on |
1043 |
|
|
its form: |
1044 |
|
|
|
1045 |
|
|
ftag true if the feature is present, false if the feature is |
1046 |
|
|
absent according to the Accept-Features header |
1047 |
|
|
|
1048 |
|
|
!ftag true if the feature is absent, false if the feature is |
1049 |
|
|
present according to the Accept-Features header |
1050 |
|
|
|
1051 |
|
|
ftag=V true if the feature is present with the value V, |
1052 |
|
|
false if the feature is not present with the value V |
1053 |
|
|
according to the Accept-Features header |
1054 |
|
|
|
1055 |
|
|
!ftag=V true if the feature is present, but not with the value |
1056 |
|
|
V, false if the feature is absent or present with the |
1057 |
|
|
value V according to the Accept-Features header |
1058 |
|
|
|
1059 |
|
|
If the Accept-Features header does not contain sufficient |
1060 |
|
|
information to assign a value using the above rules, then the value |
1061 |
|
|
is true if there is a "*" in the Accept-Features header, false |
1062 |
|
|
otherwise. |
1063 |
|
|
|
1064 |
|
|
As an example, the header |
1065 |
|
|
|
1066 |
|
|
Accept-Features: blex, !blebber, colordepth<=5, !screenwidth, |
1067 |
|
|
UA-media={stationary}, paper=a4, !paper=a0, * |
1068 |
|
|
|
1069 |
|
|
makes the following predicates true: |
1070 |
|
|
|
1071 |
|
|
blex, colordepth=4, !colordepth=6, colordepth, !screenwidth, |
1072 |
|
|
UA-media=stationary, !UA-media=screen, paper=a4, !paper=a0, |
1073 |
|
|
blex=wox, !blex=wox, paper=a5, |
1074 |
|
|
frtnbf, !frtnbf, frtnbf=4, !frtnbf=4 |
1075 |
|
|
|
1076 |
|
|
and makes the following predicates false: |
1077 |
|
|
|
1078 |
|
|
!blex, blebber, colordepth=6, colordepth=foo, !colordepth, |
1079 |
|
|
screenwidth, screenwidth=640, !screenwidth=640 |
1080 |
|
|
UA-media=screen, paper=a0 |
1081 |
|
|
|
1082 |
|
|
|
1083 |
|
|
6.4 Features attribute |
1084 |
|
|
|
1085 |
|
|
The features attribute |
1086 |
|
|
|
1087 |
|
|
"{" "features" feature-list "}" |
1088 |
|
|
|
1089 |
|
|
is used in a variant description to specify how the presence or |
1090 |
|
|
absence of particular features in the user agent affects the overall |
1091 |
|
|
quality of the variant. |
1092 |
|
|
|
1093 |
|
|
feature-list = 1%feature-list-element |
1094 |
|
|
|
1095 |
|
|
feature-list-element = ( fpred | fpred-bag ) |
1096 |
|
|
[ ":" true-improvement ] |
1097 |
|
|
[ "/" false-degradation ] |
1098 |
|
|
|
1099 |
|
|
fpred-bag = "[" 1%fpred "]" |
1100 |
|
|
|
1101 |
|
|
true-improvement = 1*3DIGIT [ "." 0*3DIGIT ] |
1102 |
|
|
false-degradation = 1*3DIGIT [ "." 0*3DIGIT ] |
1103 |
|
|
|
1104 |
|
|
Examples are: |
1105 |
|
|
|
1106 |
|
|
{features !textonly [blebber !wolx] colordepth=3:0.7 } |
1107 |
|
|
|
1108 |
|
|
{features !blink/0.5 background:1.5 [blebber !wolx]:1.4/0.8 } |
1109 |
|
|
|
1110 |
|
|
The default value for the true-improvement is 1. The default value |
1111 |
|
|
for the false-degradation is 0, or 1 if a true-improvement value is |
1112 |
|
|
given. |
1113 |
|
|
|
1114 |
|
|
The network negotiation algorithm can compute the quality |
1115 |
|
|
degradation factor associated with the features attribute by |
1116 |
|
|
multiplying all quality degradation factors of the elements of the |
1117 |
|
|
feature-list. Note that the result can be a factor greater than 1. |
1118 |
|
|
|
1119 |
|
|
A feature list element yields its true-improvement factor if the |
1120 |
|
|
corresponding feature predicate is true, or if at least one element |
1121 |
|
|
of the corresponding fpred-bag is true. The element yields its |
1122 |
|
|
false-degradation factor otherwise. |
1123 |
|
|
|
1124 |
|
|
[##Issue to be resolved: It is unknown yet whether this features |
1125 |
|
|
attribute definition makes the right tradeoff between complexity |
1126 |
|
|
and (ease of) expressive power. The attribute grammar above is |
1127 |
|
|
designed to be parseable with simple non-recursive parsers. The |
1128 |
|
|
true-improvement construct does not add expressive power in a |
1129 |
|
|
theoretical sense, but does make the (automatic) construction of |
1130 |
|
|
variant lists more straightforward in many cases.##] |
1131 |
|
|
|
1132 |
|
|
[##Aside for mathematicians: note the similarity between the |
1133 |
|
|
feature-list |
1134 |
|
|
|
1135 |
|
|
[f1 !f2] [!f1 f3] |
1136 |
|
|
|
1137 |
|
|
and the conjunctive normal form of a boolean expression. This |
1138 |
|
|
similarity implies good things about the expressive power of the |
1139 |
|
|
features attribute.##] |
1140 |
|
|
|
1141 |
|
|
|
1142 |
|
|
7 Feature negotiation examples |
1143 |
|
|
|
1144 |
|
|
This section contains examples of the use of feature tags in |
1145 |
|
|
variant descriptions. |
1146 |
|
|
|
1147 |
|
|
[##Note: A future version of this document will probably revise and |
1148 |
|
|
extend this section.##] |
1149 |
|
|
|
1150 |
|
|
|
1151 |
|
|
7.1 Use of feature tags |
1152 |
|
|
|
1153 |
|
|
Feature tags can be used in variant lists to express the quality |
1154 |
|
|
degradation associated with the presence or absence of certain |
1155 |
|
|
features. One example is |
1156 |
|
|
|
1157 |
|
|
{"index.html.plain" 0.7 }, |
1158 |
|
|
{"index.html" 1.0 {features tables frames}} |
1159 |
|
|
|
1160 |
|
|
Here, the "{features tables frames}" part expresses that index.html |
1161 |
|
|
uses the features tagged as tables and frames. If these features |
1162 |
|
|
are absent, the overall quality of index.html degrades to 0. |
1163 |
|
|
Another example is |
1164 |
|
|
|
1165 |
|
|
{"home.graphics" 1.0 {features !textonly}}, |
1166 |
|
|
{"home.textonly" 0.7 } |
1167 |
|
|
|
1168 |
|
|
where the "{features !textonly}" part expresses that home.graphics |
1169 |
|
|
requires the absence of the textonly feature. If the feature is |
1170 |
|
|
present, the overall quality of home.graphics degrades to 0. |
1171 |
|
|
|
1172 |
|
|
The absence of a feature need not always degrade the overall quality |
1173 |
|
|
to 0. In the example |
1174 |
|
|
|
1175 |
|
|
{"x.html.1" 1.0 {features fonts/0.7}} |
1176 |
|
|
|
1177 |
|
|
the absence of the fonts feature degrades the quality with a factor |
1178 |
|
|
of 0.7. "fonts/0.7" can be pronounced as "fonts, or a degradation of |
1179 |
|
|
0.7". In the example |
1180 |
|
|
|
1181 |
|
|
{"x.html.2" 0.5 {features fonts:1.5}} |
1182 |
|
|
|
1183 |
|
|
the presence of the fonts feature improves the overall quality with a |
1184 |
|
|
factor of 1.5. If the fonts feature is absent, the overall quality is |
1185 |
|
|
not affected. "fonts:1.5" can be pronounced as "fonts improves with |
1186 |
|
|
1.5". Finally, in the example |
1187 |
|
|
|
1188 |
|
|
{"y.html" 1.0 {features [blebber wolx] }} |
1189 |
|
|
|
1190 |
|
|
The "[blebber wolx]" expresses that y.html requires the presence of |
1191 |
|
|
the blebber feature or the wolx feature. This construct can be |
1192 |
|
|
used in a number of cases: |
1193 |
|
|
|
1194 |
|
|
1. blebber and wolx actually tag the same feature, but they |
1195 |
|
|
were registered by different people, and some browsers say |
1196 |
|
|
they support blebber while others say they support wolx. |
1197 |
|
|
|
1198 |
|
|
2. blebber and wolx are HTML tags of different vendors which |
1199 |
|
|
implement the same functionality, and which were used |
1200 |
|
|
together in y.html without interference. |
1201 |
|
|
|
1202 |
|
|
3. blebber and wolx are HTML tags of different vendors which |
1203 |
|
|
implement the same functionality, and y.html uses the tags in |
1204 |
|
|
a conditional HTML construct. |
1205 |
|
|
|
1206 |
|
|
4. blebber is a complicated HTML tag with only a sketchy |
1207 |
|
|
definition, implemented by one browser vendor, and wolx |
1208 |
|
|
indicates implementation of a well-defined subset of the blebber |
1209 |
|
|
tag by some other vendor(s). y.html uses only this well-defined |
1210 |
|
|
subset. |
1211 |
|
|
|
1212 |
|
|
|
1213 |
|
|
7.2 Use of numeric feature tags |
1214 |
|
|
|
1215 |
|
|
As an example of negotiation in a numeric area, the following |
1216 |
|
|
variant list describes four variants with title graphics designed |
1217 |
|
|
for increasing screen widths: |
1218 |
|
|
|
1219 |
|
|
{"home.pda" 1.0 {features !pagewidth=200}}, |
1220 |
|
|
{"home.narrow" 1.0 {features pagewidth=200 !pagewidth=600}}, |
1221 |
|
|
{"home.normal" 1.0 {features pagewidth=600 !pagewidth=1000}}, |
1222 |
|
|
{"home.wide" 1.0 {features pagewidth=1000}} |
1223 |
|
|
|
1224 |
|
|
The accept header |
1225 |
|
|
|
1226 |
|
|
Accept-Features: pagewidth<=250, * |
1227 |
|
|
|
1228 |
|
|
which indicates that the pagewidth tag is present with the |
1229 |
|
|
numeric values from 0 up to and including 250, makes the following |
1230 |
|
|
feature predicates false: |
1231 |
|
|
|
1232 |
|
|
!pagewidth=200 pagewidth=600 pagewidth=1000 |
1233 |
|
|
|
1234 |
|
|
and thereby degrades the overall quality of all above variants |
1235 |
|
|
except home.narrow to 0. The above variant list has a serious |
1236 |
|
|
problem, however: a user agent not supporting pagewidth |
1237 |
|
|
negotiation is given no guidance on which variant to select. The |
1238 |
|
|
header |
1239 |
|
|
|
1240 |
|
|
Accept-Features: !pagewidth, * |
1241 |
|
|
|
1242 |
|
|
degrades the overall quality of all above variants to 0. |
1243 |
|
|
|
1244 |
|
|
A variant list which solves this problem is |
1245 |
|
|
|
1246 |
|
|
{"home.pda" 1.0 {features !pagewidth=200}}, |
1247 |
|
|
{"home.narrow" 1.0 {features pagewidth=200 !pagewidth=600}}, |
1248 |
|
|
{"home.normal" 0.99 }, |
1249 |
|
|
{"home.wide" 1.0 {features pagewidth=1000}} |
1250 |
|
|
|
1251 |
|
|
With this list, a user agent which does not support the pagewidth |
1252 |
|
|
feature will always select the home.normal variant. |
1253 |
|
|
|
1254 |
|
|
|
1255 |
|
|
8 Feature tag registration |
1256 |
|
|
|
1257 |
|
|
[##A specification of the feature tag registration process has not |
1258 |
|
|
yet been completed. This issue has yet to be discussed by the |
1259 |
|
|
http-wg.##] |
1260 |
|
|
|
1261 |
|
|
[##According to current plans, everybody will be allowed to register |
1262 |
|
|
feature tags: registration only requires that the tag follows the |
1263 |
|
|
syntax rules, and that a definition of the meaning of the tag is |
1264 |
|
|
supplied. In particular, registration will not require actual |
1265 |
|
|
implementation of a feature, and there will be no test on whether the |
1266 |
|
|
feature definition overlaps with another feature definition. A |
1267 |
|
|
name space for RFC-published tags will be reserved. A name space |
1268 |
|
|
for experimental (unregistered) tags will also be reserved. A |
1269 |
|
|
separate draft proposing a registration method is forthcoming.##] |
1270 |
|
|
|
1271 |
|
|
[##It is unclear yet whether it is desirable for feature tags to |
1272 |
|
|
have some hierarchical structure, which would make it easier, for |
1273 |
|
|
example, to trace who registered the feature. All that is known |
1274 |
|
|
now is that it is desirable to have short feature tags. A naming |
1275 |
|
|
scheme like that for SGML-DTDs would probably yield feature tags |
1276 |
|
|
which are too long. The main advantage of having a registration |
1277 |
|
|
process at all is that it allows for short tags without running the |
1278 |
|
|
risk of `tag collision'.##] |
1279 |
|
|
|
1280 |
|
|
|
1281 |
|
|
8.1 Evolution of feature tags |
1282 |
|
|
|
1283 |
|
|
The feature negotiation mechanism is designed not to break if 1000+ |
1284 |
|
|
features, partially overlapping, are registered. This allows for |
1285 |
|
|
feature tag creation to be an evolutionary process, in which many |
1286 |
|
|
tags are created while only a few `survive' to become generally |
1287 |
|
|
used. |
1288 |
|
|
|
1289 |
|
|
As the development of new web content formats is currently in an |
1290 |
|
|
evolutionary phase, rather than a standardization phase, it is |
1291 |
|
|
thought that this evolutionary approach to feature tag creation has |
1292 |
|
|
the best chances of keeping up with new developments. |
1293 |
|
|
|
1294 |
|
|
It is expected that after the introduction of feature negotiation, |
1295 |
|
|
an explosion in feature tag registration will occur, and that only |
1296 |
|
|
some of these tags will end up being actively used to label |
1297 |
|
|
variants. Web indexing robots could, while traversing the web, |
1298 |
|
|
gather statistics about actual use of feature tags. These |
1299 |
|
|
statistics could be used by individuals to compile lists, intended |
1300 |
|
|
for content authors, of useful feature tags for particular areas of |
1301 |
|
|
negotiation. Note that this indexing activity is orthogonal to the |
1302 |
|
|
feature registration process. It is expected that, once an area of |
1303 |
|
|
negotiation is well-understood, this process will converge on a |
1304 |
|
|
commonly-used and commonly-recognized set of feature tags for that |
1305 |
|
|
area. |
1306 |
|
|
|
1307 |
|
|
|
1308 |
|
|
8.2 Core set of feature tags |
1309 |
|
|
|
1310 |
|
|
[##In order to jump-start feature negotiation, it seems useful to |
1311 |
|
|
define a `core set' of feature tags in a separate document. These |
1312 |
|
|
feature tags would cover the areas of negotiation which are |
1313 |
|
|
currently well understood, like negotiation on currently stable |
1314 |
|
|
HTML extensions. The transparent content negotiation specification |
1315 |
|
|
could then require (or strongly encourage) that user agents |
1316 |
|
|
implementing transparent content negotiation must recognize (not |
1317 |
|
|
support!) all tags in the core set. |
1318 |
|
|
|
1319 |
|
|
The core set will be proposed in a non-standards track document |
1320 |
|
|
which will be completed along with this document.##] |
1321 |
|
|
|
1322 |
|
|
|
1323 |
|
|
8.3 Feature tag design |
1324 |
|
|
|
1325 |
|
|
When designing a new feature tag, it is important to take into |
1326 |
|
|
account that existing user agents which do not recognize the new |
1327 |
|
|
tag will treat the feature as absent. In general, a new feature |
1328 |
|
|
tag needs to be designed in such a way that absence of the tag is |
1329 |
|
|
the default case which reflects current practice. If this design |
1330 |
|
|
principle is ignored, the resulting feature tag will generally be |
1331 |
|
|
unusable. |
1332 |
|
|
|
1333 |
|
|
As an example, one could try to support negotiation between |
1334 |
|
|
monochrome and color content by introducing a `color' feature tag, |
1335 |
|
|
the presence of which would indicate the capability to display |
1336 |
|
|
color graphics. However, if this new tag is used in a variant |
1337 |
|
|
list, for example |
1338 |
|
|
|
1339 |
|
|
{"rainbow.gif" 1.0 {features color} } |
1340 |
|
|
{"rainbow.mono.gif" 0.6 {features !color}} |
1341 |
|
|
|
1342 |
|
|
then existing user agents, which would not recognize the color tag, |
1343 |
|
|
would all display the monochrome rainbow. The color tag is |
1344 |
|
|
therefore unusable in situations where optimal results for existing |
1345 |
|
|
user agents are desired. To provide for negotiation in this area, |
1346 |
|
|
one must introduce a `monochrome' feature tag; its presence |
1347 |
|
|
indicates that the user agent can only render (or the user prefers |
1348 |
|
|
to view) monochrome graphics. |
1349 |
|
|
|
1350 |
|
|
|
1351 |
|
|
9 Content negotiation response codes and headers |
1352 |
|
|
|
1353 |
|
|
This specification adds one new response code to those defined in |
1354 |
|
|
HTTP/1.1 [1]. This is a 5xx (Server Error) class response. It |
1355 |
|
|
also adds six new headers. |
1356 |
|
|
|
1357 |
|
|
|
1358 |
|
|
9.1 506 Variant Also Negotiates |
1359 |
|
|
|
1360 |
|
|
The server has an internal configuration error; the chosen variant |
1361 |
|
|
resource is configured to engage in transparent content negotiation |
1362 |
|
|
itself, and is therefore not a proper end point in the negotiation |
1363 |
|
|
process. |
1364 |
|
|
|
1365 |
|
|
|
1366 |
|
|
9.2 Accept-Features |
1367 |
|
|
|
1368 |
|
|
This request header was defined in Section 6.2. |
1369 |
|
|
|
1370 |
|
|
|
1371 |
|
|
9.3 Content-Features |
1372 |
|
|
|
1373 |
|
|
The Content-Features response header can be used by a server to |
1374 |
|
|
indicate how the presence or absence of particular features in the |
1375 |
|
|
user agent affects the overall quality of the response. |
1376 |
|
|
|
1377 |
|
|
Content-Features = "Content-Features" ":" feature-list |
1378 |
|
|
|
1379 |
|
|
|
1380 |
|
|
9.4 Alternates |
1381 |
|
|
|
1382 |
|
|
The Alternates response header is used to convey the list of |
1383 |
|
|
variants bound to a negotiable resource in a response. It can also |
1384 |
|
|
contain other directives for the content negotiation process. |
1385 |
|
|
|
1386 |
|
|
Alternates = "Alternates" ":" 1#( variant-description |
1387 |
|
|
| alternates-directive ) |
1388 |
|
|
|
1389 |
|
|
alternates-directive = ( "max-age" "=" delta-seconds ) |
1390 |
|
|
| ( "min-q" "=" short-float ) |
1391 |
|
|
| extension-alternates-directive |
1392 |
|
|
|
1393 |
|
|
delta-seconds = 1*DIGIT |
1394 |
|
|
|
1395 |
|
|
short-float = 1*3DIGIT [ "." 0*3DIGIT ] |
1396 |
|
|
|
1397 |
|
|
extension-alternates-directive = |
1398 |
|
|
token [ "=" ( token | quoted-string ) ] |
1399 |
|
|
|
1400 |
|
|
An example is |
1401 |
|
|
|
1402 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
1403 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
1404 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
1405 |
|
|
{language en}}, |
1406 |
|
|
min-q=0.4 |
1407 |
|
|
|
1408 |
|
|
Any relative URI specified in a variant-description field is |
1409 |
|
|
relative to the request-URI. The max-age directive, if present, |
1410 |
|
|
specifies the freshness lifetime of the information in the |
1411 |
|
|
Alternates header. The min-q directive, if present, can influence |
1412 |
|
|
decisions made by the network negotiation algorithm on behalf of |
1413 |
|
|
the origin server. Clients should ignore all |
1414 |
|
|
extension-alternates-directives they do not understand. |
1415 |
|
|
|
1416 |
|
|
A variant list may contain multiple differing descriptions of the |
1417 |
|
|
same variant. This can be convenient if the variant uses |
1418 |
|
|
conditional rendering constructs, or if the variant resource |
1419 |
|
|
returns multiple representations using a multipart media type. |
1420 |
|
|
|
1421 |
|
|
|
1422 |
|
|
9.5 Alternates-Older |
1423 |
|
|
|
1424 |
|
|
The Alternates-Older response header conveys an estimate of the age |
1425 |
|
|
difference between the Alternates header contained in a choice |
1426 |
|
|
response and the variant data contained in the response. The age |
1427 |
|
|
is measured as the time since generation or revalidation at the |
1428 |
|
|
origin server, as in the HTTP/1.1 specification [1]. |
1429 |
|
|
|
1430 |
|
|
Alternates-Older = "Alternates-Older" ":" signed-delta-seconds |
1431 |
|
|
|
1432 |
|
|
signed-delta-seconds = [ "-" ] 1*DIGIT |
1433 |
|
|
|
1434 |
|
|
A positive value means that the Alternates header is older, and a |
1435 |
|
|
negative value means that the Alternates header is less old. If |
1436 |
|
|
the Alternates-Older header is absent, it is known or estimated |
1437 |
|
|
that there is no age difference between the Alternates header and |
1438 |
|
|
the variant data. An example is |
1439 |
|
|
|
1440 |
|
|
Alternates-Older: 5433 |
1441 |
|
|
|
1442 |
|
|
This header is important for proxies which negotiate using cached |
1443 |
|
|
variant lists; see Section 10.3. Only negotiating proxies need to be |
1444 |
|
|
able to construct Alternates-Older headers; see Section 10.2. |
1445 |
|
|
|
1446 |
|
|
[##Note: The age of the Alternates header cannot be conveyed in an |
1447 |
|
|
Alternates-Age header, because plain HTTP/1.1 caching proxies would |
1448 |
|
|
only update the Age header, not the Alternates-Age header, when |
1449 |
|
|
serving a choice response from cache memory.##] |
1450 |
|
|
|
1451 |
|
|
|
1452 |
|
|
9.6 Negotiate |
1453 |
|
|
|
1454 |
|
|
The Negotiate request header can contain directives for any content |
1455 |
|
|
negotiation process initiated by the request. Presence of this |
1456 |
|
|
header indicates that the user agent supports transparent content |
1457 |
|
|
negotiation for the current request. |
1458 |
|
|
|
1459 |
|
|
Negotiate = "Negotiate" ":" #negotiate-directive |
1460 |
|
|
|
1461 |
|
|
negotiate-directive = token [ "=" ( token | quoted-string ) ] |
1462 |
|
|
|
1463 |
|
|
An example is |
1464 |
|
|
|
1465 |
|
|
Negotiate: |
1466 |
|
|
|
1467 |
|
|
This specification does not define any negotiate-directives, this |
1468 |
|
|
is left to future extensions. Servers should ignore all |
1469 |
|
|
negotiate-directives they do not understand. The presence or |
1470 |
|
|
absence of a Negotiate header in a request is significant in |
1471 |
|
|
calculations performed by the network negotiation algorithm. |
1472 |
|
|
|
1473 |
|
|
[#Question to be resolved: is it safer to put a keyword in the |
1474 |
|
|
negotiate header to signal transparent negotiation capability? |
1475 |
|
|
Some cache implementations might treat an empty Negotiate header |
1476 |
|
|
the same as an absent Negotiate header under Vary: negotiate. Is |
1477 |
|
|
the 1.1 spec clear enough on this?##] |
1478 |
|
|
|
1479 |
|
|
|
1480 |
|
|
9.7 Variant-Vary |
1481 |
|
|
|
1482 |
|
|
The Variant-Vary response header can be used in a list response to |
1483 |
|
|
record any vary information which applies to the variant data |
1484 |
|
|
contained in the response, rather than to the response as a whole. |
1485 |
|
|
|
1486 |
|
|
Variant-Vary = "Variant-Vary" ":" ( "*" | 1#field-name ) |
1487 |
|
|
|
1488 |
|
|
Use of the Variant-Vary header is discussed in Section 10.2. |
1489 |
|
|
|
1490 |
|
|
|
1491 |
|
|
10 Content negotiation responses |
1492 |
|
|
|
1493 |
|
|
A request on a transparently negotiated resource can yield three |
1494 |
|
|
types of non-error responses: list responses, choice responses, and |
1495 |
|
|
ad hoc responses. All three types always include the Alternates |
1496 |
|
|
header bound to the negotiable resource. |
1497 |
|
|
|
1498 |
|
|
Normal responses are non-error responses generated by requests on |
1499 |
|
|
resources which are not transparently negotiated. A normal |
1500 |
|
|
response never contains an Alternates header. |
1501 |
|
|
|
1502 |
|
|
A list response always has the 300 (Multiple Choices) response code. |
1503 |
|
|
A choice response never has the 300 code, and always has a |
1504 |
|
|
Content-Location header. An ad hoc response never has the 300 |
1505 |
|
|
code, and never has a Content-Location header. |
1506 |
|
|
|
1507 |
|
|
|
1508 |
|
|
10.1 List response |
1509 |
|
|
|
1510 |
|
|
A list response has the 300 response status code. It must contain |
1511 |
|
|
(besides the normal headers required by HTTP) the Alternates header |
1512 |
|
|
bound to the negotiable resource, a Vary header and (unless it was |
1513 |
|
|
a HEAD request) an entity body which allows the user to manually |
1514 |
|
|
select the best variant. It is generated as a response to a user |
1515 |
|
|
agent capable of transparent content negotiation if the server |
1516 |
|
|
does not (perhaps cannot) choose a particular best variant for the |
1517 |
|
|
request. |
1518 |
|
|
|
1519 |
|
|
An example a list response is: |
1520 |
|
|
|
1521 |
|
|
HTTP/1.1 300 Multiple Choices |
1522 |
|
|
Date: Tue, 11 Jun 1996 20:02:21 GMT |
1523 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
1524 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
1525 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
1526 |
|
|
{language en}}, max-age=86400 |
1527 |
|
|
Vary: negotiate, accept, accept-language |
1528 |
|
|
Etag: "gonkyyyy" |
1529 |
|
|
Cache-control: max-age=86400 |
1530 |
|
|
Content-Type: text/html |
1531 |
|
|
Content-Length: 227 |
1532 |
|
|
|
1533 |
|
|
<h2>Multiple Choices:</h2> |
1534 |
|
|
<ul> |
1535 |
|
|
<li><a href=paper.html.en>HTML, English version</a> |
1536 |
|
|
<li><a href=paper.html.fr>HTML, French version</a> |
1537 |
|
|
<li><a href=paper.ps.en>Postscript, English version</a> |
1538 |
|
|
</ul> |
1539 |
|
|
|
1540 |
|
|
Note that the same max-age value appears both in the Alternates |
1541 |
|
|
header and in the Cache-Control header. |
1542 |
|
|
|
1543 |
|
|
The Vary header in the response should ensure correct handling by |
1544 |
|
|
HTTP/1.1 caching proxies not capable of transparent content |
1545 |
|
|
negotiation. This header can either be |
1546 |
|
|
|
1547 |
|
|
Vary: * |
1548 |
|
|
|
1549 |
|
|
or a more elaborate header; see Section 10.5.1. |
1550 |
|
|
|
1551 |
|
|
Only the origin server may construct list responses. List |
1552 |
|
|
responses are cacheable unless indicated otherwise. A proxy may |
1553 |
|
|
reuse a list response as a whole if the response is fresh in the |
1554 |
|
|
HTTP/1.1 specification [1] sense, even if the Alternates |
1555 |
|
|
header in the response is no longer itself fresh. |
1556 |
|
|
|
1557 |
|
|
According to the HTTP/1.1 specification [1], a user agent not |
1558 |
|
|
capable of transparent content negotiation will, when receiving a |
1559 |
|
|
list response, display the entity body included in the response. |
1560 |
|
|
If the response contains a Location header, however, the user agent |
1561 |
|
|
may automatically redirect to this location. |
1562 |
|
|
|
1563 |
|
|
The handling of list responses by clients supporting transparent |
1564 |
|
|
content negotiation is described in Sections 12.1 and 14. |
1565 |
|
|
|
1566 |
|
|
Note: Some existing versions of HTTP/1.0 clients are known to |
1567 |
|
|
silently ignore list responses, instead of handling them |
1568 |
|
|
according to the HTTP/1.0 specification [3]. Servers should |
1569 |
|
|
therefore be careful in sending list responses to |
1570 |
|
|
non-negotiating HTTP/1.0 user agents, and in making these |
1571 |
|
|
responses cacheable. |
1572 |
|
|
|
1573 |
|
|
|
1574 |
|
|
10.2 Choice response |
1575 |
|
|
|
1576 |
|
|
A choice response merges a normal HTTP response from the chosen |
1577 |
|
|
variant, a Content-Location header giving the location of the |
1578 |
|
|
variant, and the Alternates and Vary headers bound to the |
1579 |
|
|
negotiable resource. |
1580 |
|
|
|
1581 |
|
|
The cacheability of a choice response as a whole is defined in the |
1582 |
|
|
HTTP/1.1 specification [1]. Depending on the response code, a |
1583 |
|
|
choice response as a whole is cacheable unless indicated |
1584 |
|
|
otherwise. |
1585 |
|
|
|
1586 |
|
|
Origin servers and proxy caches must construct choice responses |
1587 |
|
|
with the following algorithm (or any other algorithm which gives |
1588 |
|
|
equal results.) |
1589 |
|
|
|
1590 |
|
|
1. Construct a HTTP request message on the best variant resource |
1591 |
|
|
by rewriting the request-URI and Host header (if appropriate) |
1592 |
|
|
of the received request message on the negotiable resource. |
1593 |
|
|
|
1594 |
|
|
2. Generate a valid HTTP response message for the request message |
1595 |
|
|
constructed in step 1. In a proxy cache, the message can be |
1596 |
|
|
obtained from cache memory, or by passing the constructed HTTP |
1597 |
|
|
request message towards the origin server. |
1598 |
|
|
|
1599 |
|
|
3. Check for an internal server configuration error. If the HTTP |
1600 |
|
|
response message generated in step 2 contains an Alternates |
1601 |
|
|
header, a Content-Location header, or has the 300 status code, |
1602 |
|
|
then the best variant resource is not a proper end point in |
1603 |
|
|
the negotiation process, and a 506 (Variant Also Negotiates) |
1604 |
|
|
error response message should be generated instead of going to |
1605 |
|
|
step 4. |
1606 |
|
|
|
1607 |
|
|
4. Add a number of headers to the HTTP response message generated |
1608 |
|
|
in step 2. |
1609 |
|
|
|
1610 |
|
|
a. Add a Content-Location header giving the location of the |
1611 |
|
|
chosen variant. |
1612 |
|
|
|
1613 |
|
|
Note: According to the HTTP/1.1 specification [1], if |
1614 |
|
|
the Content-Location header contains a relative URI, |
1615 |
|
|
this URI is relative to the URI in the Content-Base |
1616 |
|
|
header, if present. |
1617 |
|
|
|
1618 |
|
|
b. If any Vary headers are present in the response message |
1619 |
|
|
from step 2, add, for every Vary header, a Variant-Vary |
1620 |
|
|
header with a copy of the contents of this Vary header. |
1621 |
|
|
|
1622 |
|
|
c. Add the Alternates header bound to the negotiable resource. |
1623 |
|
|
In a proxy cache, a fresh or first-hand Alternates header |
1624 |
|
|
bound to the negotiable resource must be added, Section |
1625 |
|
|
10.3 specifies how this header can be obtained. |
1626 |
|
|
|
1627 |
|
|
d. Add a Vary header to ensure correct handling by HTTP/1.1 |
1628 |
|
|
caching proxies not capable of transparent content |
1629 |
|
|
negotiation. This header can either be |
1630 |
|
|
|
1631 |
|
|
Vary: * |
1632 |
|
|
|
1633 |
|
|
or a more elaborate header, see Section 10.5. |
1634 |
|
|
|
1635 |
|
|
e. To ensure compatibility with HTTP/1.0 caching proxies which |
1636 |
|
|
do not recognize the Vary header, an Expires header with a |
1637 |
|
|
date in the past may be added. See Appendix 19.1 for more |
1638 |
|
|
information. |
1639 |
|
|
|
1640 |
|
|
f. Only in proxy caches: compute the age difference between |
1641 |
|
|
the variant data and the Alternates header in the response |
1642 |
|
|
in the following way. |
1643 |
|
|
|
1644 |
|
|
- Let variant_age be the age of the response obtained in |
1645 |
|
|
step 2, calculated according to the rules in the HTTP/1.1 |
1646 |
|
|
specification [1]. If the response is known to be |
1647 |
|
|
first-hand, variant_age can be 0. |
1648 |
|
|
|
1649 |
|
|
- Let alternates_age be the age of the Alternates header |
1650 |
|
|
added in step c, calculated according to the rules in |
1651 |
|
|
Section 10.3, or 0 if the Alternates header is known to |
1652 |
|
|
be first-hand. |
1653 |
|
|
|
1654 |
|
|
- Compute the age difference: |
1655 |
|
|
|
1656 |
|
|
alternates_older = alternates_age - variant_age |
1657 |
|
|
|
1658 |
|
|
If the computed alternates_older value is greater than 0, |
1659 |
|
|
an Alternates-Older header with this value must be added to |
1660 |
|
|
the response. If the value is 0, an Alternates-Older |
1661 |
|
|
header with this value need not be added. If the value is |
1662 |
|
|
less than 0, an Alternates-Older header with this value |
1663 |
|
|
should be added. |
1664 |
|
|
|
1665 |
|
|
|
1666 |
|
|
An example of a choice response generated by an origin server is: |
1667 |
|
|
|
1668 |
|
|
HTTP/1.1 200 OK |
1669 |
|
|
Date: Tue, 11 Jun 1996 20:05:31 GMT |
1670 |
|
|
Content-Type: text/html |
1671 |
|
|
Last-Modified: Mon, 10 Jun 1996 10:01:14 GMT |
1672 |
|
|
Etag: "497542" |
1673 |
|
|
Cache-control: max-age=604800 |
1674 |
|
|
Content-Length: 5327 |
1675 |
|
|
Content-Location: paper.html.en |
1676 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
1677 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
1678 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
1679 |
|
|
{language en}}, max-age=86400 |
1680 |
|
|
Vary: negotiate, accept, accept-language |
1681 |
|
|
Expires: Thu, 01 Jan 1980 00:00:00 GMT |
1682 |
|
|
|
1683 |
|
|
<title>A paper about .... |
1684 |
|
|
|
1685 |
|
|
|
1686 |
|
|
An example of a choice response which could be generated by a |
1687 |
|
|
caching proxy is: |
1688 |
|
|
|
1689 |
|
|
HTTP/1.1 200 OK |
1690 |
|
|
Date: Tue, 11 Jun 1996 20:05:31 GMT |
1691 |
|
|
Content-Type: text/html |
1692 |
|
|
Last-Modified: Mon, 10 Jun 1996 10:01:14 GMT |
1693 |
|
|
Etag: "497542" |
1694 |
|
|
Cache-control: max-age=604800 |
1695 |
|
|
Content-Length: 5327 |
1696 |
|
|
Age: 432000 |
1697 |
|
|
Content-Location: paper.html.en |
1698 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
1699 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
1700 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
1701 |
|
|
{language en}}, max-age=86400 |
1702 |
|
|
Vary: negotiate, accept, accept-language |
1703 |
|
|
Alternates-Older: -410400 |
1704 |
|
|
Expires: Thu, 01 Jan 1980 00:00:00 GMT |
1705 |
|
|
|
1706 |
|
|
<title>A paper about .... |
1707 |
|
|
|
1708 |
|
|
Here, the age of the variant data is 432000 seconds (5 days), while |
1709 |
|
|
the age of the Alternates header is 432000 + -410400 = 21600 |
1710 |
|
|
seconds (6 hours). |
1711 |
|
|
|
1712 |
|
|
|
1713 |
|
|
10.2B Ad hoc response |
1714 |
|
|
|
1715 |
|
|
An ad hoc response never has the 300 response status code and never |
1716 |
|
|
has a Content-Location header. It must contain the Alternates |
1717 |
|
|
header bound to the negotiable resource, and a Vary header if the |
1718 |
|
|
response is cacheable. It may be generated by an origin server, |
1719 |
|
|
usually as a response to a non-negotiating user agent, if the |
1720 |
|
|
server cannot or does not want to send a list or choice response. |
1721 |
|
|
|
1722 |
|
|
The Vary header in the response should ensure correct handling by |
1723 |
|
|
HTTP/1.1 caching proxies not capable of transparent content |
1724 |
|
|
negotiation. This header can either be |
1725 |
|
|
|
1726 |
|
|
Vary: * |
1727 |
|
|
|
1728 |
|
|
or a more elaborate header, see Section 10.5.1. Ad hoc responses |
1729 |
|
|
are cacheable unless indicated otherwise. A proxy may reuse an ad |
1730 |
|
|
hoc response as a whole if the response is fresh in the sense of |
1731 |
|
|
the HTTP/1.1 specification [1], even if the Alternates header in |
1732 |
|
|
the response is no longer fresh by itself. |
1733 |
|
|
|
1734 |
|
|
The handling of ad hoc responses by clients supporting transparent |
1735 |
|
|
content negotiation is described in Sections 12.1 and 14. |
1736 |
|
|
|
1737 |
|
|
An example of an ad hoc response is: |
1738 |
|
|
|
1739 |
|
|
HTTP/1.1 200 OK |
1740 |
|
|
Date: Tue, 11 Jun 1996 20:02:26 GMT |
1741 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
1742 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
1743 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
1744 |
|
|
{language en}}, max-age=86400 |
1745 |
|
|
Vary: negotiate, accept, accept-language |
1746 |
|
|
Etag: "gonkzzzz" |
1747 |
|
|
Cache-control: max-age=86400 |
1748 |
|
|
Content-Type: text/html |
1749 |
|
|
Content-Length: 227 |
1750 |
|
|
|
1751 |
|
|
<h2>Multiple Choices:</h2> |
1752 |
|
|
<ul> |
1753 |
|
|
<li><a href=paper.html.en>HTML, English version</a> |
1754 |
|
|
<li><a href=paper.html.fr>HTML, French version</a> |
1755 |
|
|
<li><a href=paper.ps.en>Postscript, English version</a> |
1756 |
|
|
</ul> |
1757 |
|
|
|
1758 |
|
|
Another example is |
1759 |
|
|
|
1760 |
|
|
HTTP/1.1 302 Moved Temporarily |
1761 |
|
|
Date: Tue, 11 Jun 1996 20:02:28 GMT |
1762 |
|
|
Alternates: {"paper.html.en" 0.9 {type text/html} {language en}}, |
1763 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
1764 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} |
1765 |
|
|
{language en}}, max-age=86400 |
1766 |
|
|
Location: paper.html.en |
1767 |
|
|
Content-Type: text/html |
1768 |
|
|
Content-Length: 59 |
1769 |
|
|
|
1770 |
|
|
This document is available <a href=paper.html.en>here</a>. |
1771 |
|
|
|
1772 |
|
|
|
1773 |
|
|
10.3 Reusing the Alternates header |
1774 |
|
|
|
1775 |
|
|
Proxy caches may extract and cache the Alternates header in any |
1776 |
|
|
cacheable list, choice, or ad hoc response. If the Alternates |
1777 |
|
|
header is fresh or first-hand, it may be reused to negotiate on |
1778 |
|
|
behalf of the user agent or origin server (Section 14) and to |
1779 |
|
|
construct choice responses (Section 10.2). The freshness of an |
1780 |
|
|
Alternates header is determined in the following way. |
1781 |
|
|
|
1782 |
|
|
- Let response_age be the current age of the response from which |
1783 |
|
|
the header was extracted, calculated according to the rules in |
1784 |
|
|
the HTTP/1.1 specification [1]. |
1785 |
|
|
|
1786 |
|
|
- Let alternates_older be the value in the Alternates-Older |
1787 |
|
|
header of this response, or 0 if no Alternates-Older header is |
1788 |
|
|
present. |
1789 |
|
|
|
1790 |
|
|
- Let max_age be the value of the max-age directive in the |
1791 |
|
|
Alternates header, or positive infinity if a max-age directive |
1792 |
|
|
is absent. |
1793 |
|
|
|
1794 |
|
|
The age of the alternates header is |
1795 |
|
|
|
1796 |
|
|
alternates_age = response_age + alternates_older . |
1797 |
|
|
|
1798 |
|
|
The Alternates header is fresh if |
1799 |
|
|
|
1800 |
|
|
alternates_age < max_age . |
1801 |
|
|
|
1802 |
|
|
An Alternates header is fist-hand if it is used, without unnecessary |
1803 |
|
|
delay, after being extracted from a first-hand response. |
1804 |
|
|
|
1805 |
|
|
|
1806 |
|
|
10.4 Extracting a normal response from a choice response |
1807 |
|
|
|
1808 |
|
|
If a proxy receives a choice response, it may extract and cache the |
1809 |
|
|
normal HTTP response contained therein. The normal response can be |
1810 |
|
|
extracted by taking a copy of the choice response and then deleting |
1811 |
|
|
the Content-Location, Alternates, Vary, and Alternates-Older |
1812 |
|
|
header, and renaming any Variant-Vary headers to Vary headers. |
1813 |
|
|
|
1814 |
|
|
[##Question to be resolved: A method to get rid of the Expires |
1815 |
|
|
header which could have been added in a step 4.e of Section 10.2 |
1816 |
|
|
could be invented. Should such a method be added to this |
1817 |
|
|
specification? Probably not.##] |
1818 |
|
|
|
1819 |
|
|
This normal response may then be cached (as a HTTP response to the |
1820 |
|
|
variant request as constructed in step 1. of Section 10.2) and |
1821 |
|
|
reused to answer future direct requests on the variant resource |
1822 |
|
|
according to the rules in the HTTP/1.1 specification [1]. This |
1823 |
|
|
caching of extracted responses can increase overall efficiency with |
1824 |
|
|
up to a factor 2. |
1825 |
|
|
|
1826 |
|
|
For security reasons (see Section 15.2), an extracted normal |
1827 |
|
|
response may only be cached if the negotiable resource and the |
1828 |
|
|
variant resource are neighbors. If they are not neighbors, the |
1829 |
|
|
proxy should reject the choice response as a probable spoofing |
1830 |
|
|
attempt and pass on a 502 (bad gateway) error response instead. |
1831 |
|
|
|
1832 |
|
|
|
1833 |
|
|
10.5 Elaborate Vary headers |
1834 |
|
|
|
1835 |
|
|
The Vary header added to a list, choice, or ad hoc response should |
1836 |
|
|
ensure correct handling by HTTP/1.1 caching proxies not capable of |
1837 |
|
|
transparent content negotiation. The most simple Vary header which |
1838 |
|
|
satisfies this requirement is |
1839 |
|
|
|
1840 |
|
|
Vary: * |
1841 |
|
|
|
1842 |
|
|
A more elaborate Vary header can be used to allow for certain |
1843 |
|
|
optimizations which could be performed by some HTTP/1.1 caches |
1844 |
|
|
which are not capable of transparent content negotiation, but which |
1845 |
|
|
do cache multiple variants of one resource based on Vary header |
1846 |
|
|
contents. |
1847 |
|
|
|
1848 |
|
|
10.5.1 Construction of an elaborate Vary header |
1849 |
|
|
|
1850 |
|
|
Origin servers can construct a more elaborate Vary header in the |
1851 |
|
|
following way. First, start with the header |
1852 |
|
|
|
1853 |
|
|
Vary: negotiate |
1854 |
|
|
|
1855 |
|
|
Then, if any of the following attributes is present in any variant |
1856 |
|
|
description in the Alternates header, add the corresponding header |
1857 |
|
|
name to the Vary header |
1858 |
|
|
|
1859 |
|
|
attribute | header name to add |
1860 |
|
|
-----------+--------------------- |
1861 |
|
|
type | accept |
1862 |
|
|
charset | accept-charset |
1863 |
|
|
language | accept-language |
1864 |
|
|
features | accept-features |
1865 |
|
|
|
1866 |
|
|
The Vary header constructed in this way specifies the response |
1867 |
|
|
variation which can be caused by the use of the network negotiation |
1868 |
|
|
algorithm in proxies. If the origin server uses a custom |
1869 |
|
|
negotiation algorithm which takes additional headers (for example |
1870 |
|
|
User-Agent) into account, these should also be added to the Vary |
1871 |
|
|
header. |
1872 |
|
|
|
1873 |
|
|
10.5.2 Caching of an elaborate Vary header |
1874 |
|
|
|
1875 |
|
|
Proxy caches cannot construct elaborate Vary headers by themselves, |
1876 |
|
|
because they may not assume that the origin server uses the |
1877 |
|
|
standard network negotiation algorithm to vary its responses. |
1878 |
|
|
However, when extracting an Alternates header from a response |
1879 |
|
|
(Section 10.3) caches may also extract the Vary header in the |
1880 |
|
|
response, and reuse it along with the Alternates header. A clean |
1881 |
|
|
Vary header can however only be extracted if the variant does not |
1882 |
|
|
vary itself, i.e. if a Variant-Vary header is absent. |
1883 |
|
|
|
1884 |
|
|
|
1885 |
|
|
11 The network negotiation algorithm |
1886 |
|
|
|
1887 |
|
|
The network negotiation algorithm is a standardized algorithm by |
1888 |
|
|
which a party in the negotiation process can make a choice on |
1889 |
|
|
behalf of another party. For example, a proxy could choose a |
1890 |
|
|
particular variant on behalf of the user agent in order to speed up |
1891 |
|
|
the negotiation process by cutting corners (see Section 4.4). |
1892 |
|
|
|
1893 |
|
|
General principles underlying the network negotiation algorithm are |
1894 |
|
|
as follows. |
1895 |
|
|
|
1896 |
|
|
- When running on an origin server or proxy, the algorithm will |
1897 |
|
|
usually only have partial user agent capabilities and |
1898 |
|
|
preferences information as input. Therefore, instead of a |
1899 |
|
|
choice for a best variant, the algorithm can also yield an |
1900 |
|
|
`insufficient data, cannot choose' result. |
1901 |
|
|
|
1902 |
|
|
- Decisions are always made on either on behalf of the user agent |
1903 |
|
|
or on behalf of the origin server. They are made on behalf of |
1904 |
|
|
the user agent if the user agent indicates that it is capable of |
1905 |
|
|
transparent content negotiation, and on behalf of the origin |
1906 |
|
|
server otherwise. |
1907 |
|
|
|
1908 |
|
|
- By including an Alternates header in the response, the origin |
1909 |
|
|
server gives upstream proxies the permission to perform actions |
1910 |
|
|
prescribed by the network negotiation algorithm instead of |
1911 |
|
|
actions prescribed by the plain HTTP specification. |
1912 |
|
|
|
1913 |
|
|
- It is expected that user agents will use the network negotiation |
1914 |
|
|
algorithm by default, locally supplying their complete |
1915 |
|
|
capabilities and preferences to the algorithm, but this is not |
1916 |
|
|
required. User agents may use customized negotiation algorithms |
1917 |
|
|
to automatically choose a variant. Such algorithms could for |
1918 |
|
|
example account for cross-dependencies between dimensions of |
1919 |
|
|
negotiation. |
1920 |
|
|
|
1921 |
|
|
Note that in this specification, `use of the network negotiation |
1922 |
|
|
algorithm' means use of any algorithm which yields equal results. |
1923 |
|
|
|
1924 |
|
|
|
1925 |
|
|
11.1 Input |
1926 |
|
|
|
1927 |
|
|
The algorithm is always executed for a particular request on a |
1928 |
|
|
particular transparently negotiable resource. It takes the |
1929 |
|
|
following information as input. |
1930 |
|
|
|
1931 |
|
|
1. The list of variants of the resource, as present in the |
1932 |
|
|
Alternates header of the resource. |
1933 |
|
|
|
1934 |
|
|
2. Any "min-q" directive pertaining to the negotiation process, as |
1935 |
|
|
specified by the Alternates header of the resource. |
1936 |
|
|
|
1937 |
|
|
3. (Partial) Information about capabilities and preferences of the |
1938 |
|
|
user agent for this particular request, as given in the Accept |
1939 |
|
|
headers of the request, or, if the algorithm runs on a user |
1940 |
|
|
agent, as given by the internal capabilities and preferences |
1941 |
|
|
database. |
1942 |
|
|
|
1943 |
|
|
4. A boolean indicating whether or not the user agent is capable |
1944 |
|
|
of transparent content negotiation for this request. (True if |
1945 |
|
|
the request includes a Negotiate header, false otherwise). |
1946 |
|
|
|
1947 |
|
|
|
1948 |
|
|
11.2 Output |
1949 |
|
|
|
1950 |
|
|
As its output, the network negotiation algorithm and will yield the |
1951 |
|
|
appropriate action to be performed. Actions have labels `ACT_UA' |
1952 |
|
|
for actions performed on behalf of the user agent, and `ACT_OS' for |
1953 |
|
|
actions performed on behalf of the origin server. |
1954 |
|
|
|
1955 |
|
|
11.2.1 Output for proxies |
1956 |
|
|
|
1957 |
|
|
If the algorithm runs on a proxy, there are four different possible |
1958 |
|
|
results. The first two results can be generated if the user agent |
1959 |
|
|
is capable of transparent content negotiation: |
1960 |
|
|
|
1961 |
|
|
Choice_UA |
1962 |
|
|
|
1963 |
|
|
Choice on behalf of the user agent. The best variant may be |
1964 |
|
|
retrieved and returned in a choice response. |
1965 |
|
|
|
1966 |
|
|
List_UA |
1967 |
|
|
|
1968 |
|
|
No choice possible, return the list. The Accept headers do |
1969 |
|
|
not contain sufficient information to make a choice on behalf |
1970 |
|
|
of the user agent possible. A list response should be |
1971 |
|
|
returned, allowing the user agent to make the choice itself. |
1972 |
|
|
|
1973 |
|
|
The following results can be generated if the user agent is not |
1974 |
|
|
capable of transparent content negotiation: |
1975 |
|
|
|
1976 |
|
|
Choice_OS |
1977 |
|
|
|
1978 |
|
|
Choice on behalf of the origin server. The best variant may |
1979 |
|
|
be retrieved and returned in a choice response. |
1980 |
|
|
|
1981 |
|
|
Forward_OS |
1982 |
|
|
|
1983 |
|
|
No choice possible, forward the request towards the origin |
1984 |
|
|
server. The Accept headers do not contain sufficient |
1985 |
|
|
information to make a choice on behalf of the origin server |
1986 |
|
|
possible. The request should be forwarded towards the origin |
1987 |
|
|
server so that it can choose the most appropriate action with |
1988 |
|
|
a custom algorithm. |
1989 |
|
|
|
1990 |
|
|
11.2.2 Output for origin servers |
1991 |
|
|
|
1992 |
|
|
If the algorithm runs on an origin server, all results above are |
1993 |
|
|
possible. The last result has a different interpretation: |
1994 |
|
|
|
1995 |
|
|
Forward_OS |
1996 |
|
|
|
1997 |
|
|
No choice possible, internally forward the request to a custom |
1998 |
|
|
algorithm which chooses an appropriate action. |
1999 |
|
|
|
2000 |
|
|
Usually, the appropriate action is the sending of an ad hoc |
2001 |
|
|
response. |
2002 |
|
|
|
2003 |
|
|
11.2.3 Output for user agents |
2004 |
|
|
|
2005 |
|
|
If the algorithm runs on a user agent, only the results List_UA and |
2006 |
|
|
Choice_UA are possible, with the following interpretations. |
2007 |
|
|
|
2008 |
|
|
Choice_UA |
2009 |
|
|
|
2010 |
|
|
Automatic choice. A particular variant X must be retrieved and |
2011 |
|
|
displayed. |
2012 |
|
|
|
2013 |
|
|
List_UA |
2014 |
|
|
|
2015 |
|
|
No automatic choice possible, none of of the variants can be |
2016 |
|
|
rendered according to the preferences and capabilities |
2017 |
|
|
database. An appropriate action like showing an error message |
2018 |
|
|
with the list of variants to the user must be performed. |
2019 |
|
|
|
2020 |
|
|
|
2021 |
|
|
11.3 Computing the overall quality values |
2022 |
|
|
|
2023 |
|
|
As a first step in the network negotiation algorithm, the overall |
2024 |
|
|
qualities of the individual variants in the list are computed. |
2025 |
|
|
|
2026 |
|
|
The overall quality Q of a variant is the value |
2027 |
|
|
|
2028 |
|
|
Q = qs * qt * qc * ql * qf |
2029 |
|
|
|
2030 |
|
|
where the factors qs, qt, qc, ql, and qf are determined as follows. |
2031 |
|
|
|
2032 |
|
|
qs Is the source quality factor in the variant description. |
2033 |
|
|
|
2034 |
|
|
qt The media type quality factor is 1 if there is no type |
2035 |
|
|
attribute in the variant description, or if there is no |
2036 |
|
|
Accept header in the request. Otherwise, it is the quality |
2037 |
|
|
assigned by the Accept header to the media type in the type |
2038 |
|
|
attribute. |
2039 |
|
|
|
2040 |
|
|
Note: If a type is matched by none of the elements of an |
2041 |
|
|
Accept header, the Accept header assigns the quality factor |
2042 |
|
|
0 to that type. |
2043 |
|
|
|
2044 |
|
|
qc The charset quality factor is 1 if there is no charset |
2045 |
|
|
attribute in the variant description, or if there is no |
2046 |
|
|
Accept-Charset header in the request. Otherwise, the charset |
2047 |
|
|
quality factor is the quality assigned by the Accept-Charset |
2048 |
|
|
header to charset in the charset attribute. |
2049 |
|
|
|
2050 |
|
|
Note: If a charset does not appear in an Accept-Charset |
2051 |
|
|
header, the Accept-Charset header assigns the quality |
2052 |
|
|
factor 0 to that charset. |
2053 |
|
|
|
2054 |
|
|
ql The language quality factor is 1 if there is no language |
2055 |
|
|
attribute in the variant description, or if there is no |
2056 |
|
|
Accept-Language header in the request. Otherwise, the |
2057 |
|
|
language quality factor is the highest quality factor |
2058 |
|
|
assigned by the Accept-Language header to any one of the |
2059 |
|
|
languages listed in the language attribute. |
2060 |
|
|
|
2061 |
|
|
qf The features quality factor is 1 if there is no features |
2062 |
|
|
attribute in the variant description, or if there is no |
2063 |
|
|
Accept-Features header in the request. Otherwise, it is |
2064 |
|
|
the feature negotiation quality degradation value for the |
2065 |
|
|
features attribute, see Section 6.4. |
2066 |
|
|
|
2067 |
|
|
As an example, if a variant list contains the variant description |
2068 |
|
|
|
2069 |
|
|
{"paper.html.en" 0.7 {type text/html} {language fr}} |
2070 |
|
|
|
2071 |
|
|
and if the request contains the Accept headers |
2072 |
|
|
|
2073 |
|
|
Accept: text/html:q=1.0, */*:q=0.8 |
2074 |
|
|
Accept-Language: en;q=1.0, fr;q=0.5 |
2075 |
|
|
|
2076 |
|
|
the network negotiation algorithm will compute an overall quality |
2077 |
|
|
for the variant as follows: |
2078 |
|
|
|
2079 |
|
|
{"paper.html.en" 0.7 {type text/html} {language fr}} |
2080 |
|
|
| | | |
2081 |
|
|
| | | |
2082 |
|
|
V V V |
2083 |
|
|
0.7 * 1.0 * 0.5 = 0.35 |
2084 |
|
|
|
2085 |
|
|
With the above Accept headers, the complete variant list |
2086 |
|
|
|
2087 |
|
|
{"paper.html.en" 0.9 {type text/html} {language en}}, |
2088 |
|
|
{"paper.html.fr" 0.7 {type text/html} {language fr}}, |
2089 |
|
|
{"paper.ps.en" 1.0 {type application/postscript} {language en}} |
2090 |
|
|
|
2091 |
|
|
would yield the following computations: |
2092 |
|
|
|
2093 |
|
|
qs * qt * qc * ql * qf = Q |
2094 |
|
|
--- --- --- --- --- ---- |
2095 |
|
|
paper.html.en: 0.9 * 1.0 * 1.0 * 1.0 * 1.0 = 0.9 |
2096 |
|
|
paper.html.fr: 0.7 * 1.0 * 1.0 * 0.5 * 1.0 = 0.35 |
2097 |
|
|
paper.ps.en: 1.0 * 0.8 * 1.0 * 1.0 * 1.0 = 0.8 |
2098 |
|
|
|
2099 |
|
|
|
2100 |
|
|
11.4 Definite and speculative quality values |
2101 |
|
|
|
2102 |
|
|
An overall quality value computed by an origin server or proxy can |
2103 |
|
|
be either definite or speculative. |
2104 |
|
|
|
2105 |
|
|
An overall quality value for a variant is definite if it was |
2106 |
|
|
computed without using any wildcard characters '*' in the Accept |
2107 |
|
|
headers, and without the need to use the absence of a particular |
2108 |
|
|
Accept header. An overall quality value is speculative otherwise. |
2109 |
|
|
|
2110 |
|
|
As an example, in the previous section, the quality values of |
2111 |
|
|
paper.html.en and paper.html.fr are definite, and the quality value |
2112 |
|
|
of paper.ps.en is speculative because the type |
2113 |
|
|
application/postscript was matched to the range */*. |
2114 |
|
|
|
2115 |
|
|
Definiteness can be defined more formally as follows. An overall |
2116 |
|
|
quality value Q is definite if the same quality value Q could be |
2117 |
|
|
computed after the request message is changed in the following way: |
2118 |
|
|
|
2119 |
|
|
1. If an Accept, Accept-Charset, Accept-Language, or |
2120 |
|
|
Accept-Features, header is missing from the request, add |
2121 |
|
|
this header with an empty field. |
2122 |
|
|
|
2123 |
|
|
2. Delete any media ranges containing a wildcard character '*' |
2124 |
|
|
from the Accept header. Delete the language-range '*', if |
2125 |
|
|
present, from the Accept-Language header. Delete the |
2126 |
|
|
wildcard '*', if present, from the Accept-Features header. |
2127 |
|
|
|
2128 |
|
|
As another example, the overall quality factor for the variant |
2129 |
|
|
|
2130 |
|
|
{"blah.html" 1 {language en-gb} {features blebber [x y]}} |
2131 |
|
|
|
2132 |
|
|
is 1 and definite with the Accept headers |
2133 |
|
|
|
2134 |
|
|
Accept-Language: en-gb, fr |
2135 |
|
|
Accept-Features: blebber, x, !y, * |
2136 |
|
|
|
2137 |
|
|
and |
2138 |
|
|
|
2139 |
|
|
Accept-Language: en, fr |
2140 |
|
|
Accept-Features: blebber, x, * |
2141 |
|
|
|
2142 |
|
|
The overall quality factor is still 1, but speculative, with the |
2143 |
|
|
Accept headers |
2144 |
|
|
|
2145 |
|
|
Accept-language: en-gb, fr |
2146 |
|
|
Accept-Features: blebber, !y, * |
2147 |
|
|
|
2148 |
|
|
and |
2149 |
|
|
|
2150 |
|
|
Accept-Language: fr, * |
2151 |
|
|
Accept-Features: blebber, x, !y, * |
2152 |
|
|
|
2153 |
|
|
|
2154 |
|
|
11.5 Determining the result |
2155 |
|
|
|
2156 |
|
|
The best variant, as determined by the network negotiation |
2157 |
|
|
algorithm, is the one variant with the highest overall quality |
2158 |
|
|
value, or, if there are multiple variants which share the highest |
2159 |
|
|
overall quality, the first variant in the list with this value. |
2160 |
|
|
|
2161 |
|
|
11.5.1 Result for proxies and origin servers |
2162 |
|
|
|
2163 |
|
|
When running on a proxy or origin server, the result of the network |
2164 |
|
|
negotiation algorithm is determined as follows. |
2165 |
|
|
|
2166 |
|
|
1. If the negotiable resource and the best variant resource are not |
2167 |
|
|
neighbors, then the result is List_UA if the user agent is |
2168 |
|
|
capable of transparent content negotiation, Forward_OS otherwise. |
2169 |
|
|
This rule exists for security reasons: it prevents some forms of |
2170 |
|
|
spoofing, see Section 15.2. |
2171 |
|
|
|
2172 |
|
|
2. If the above rule does not apply, then |
2173 |
|
|
|
2174 |
|
|
a. If the user agent is capable of transparent content |
2175 |
|
|
negotiation, the result is Choice_UA if the best variant has |
2176 |
|
|
a definite overall quality value greater than 0, and List_UA |
2177 |
|
|
otherwise. |
2178 |
|
|
|
2179 |
|
|
b. If the user agent is not capable of transparent content |
2180 |
|
|
negotiation, the result is Choice_OS if the best variant has |
2181 |
|
|
a (definite or speculative) overall quality value which is |
2182 |
|
|
greater than 0, or at least the value of the "min-q" |
2183 |
|
|
directive if this directive is present in the Alternates |
2184 |
|
|
header. The result is Forward_OS otherwise. |
2185 |
|
|
|
2186 |
|
|
11.5.2 Result for user agents |
2187 |
|
|
|
2188 |
|
|
When running on a user agent, the result of the network negotiation |
2189 |
|
|
algorithm is Choice_UA if the best variant has an overall quality |
2190 |
|
|
value greater than 0, and List_UA otherwise. |
2191 |
|
|
|
2192 |
|
|
|
2193 |
|
|
11.6 Construction of short requests |
2194 |
|
|
|
2195 |
|
|
Under normal HTTP semantics, the interpretation of the request |
2196 |
|
|
header `Accept: */*' is |
2197 |
|
|
|
2198 |
|
|
`I accept all media types with a quality of 1.0'. |
2199 |
|
|
|
2200 |
|
|
One of the most important properties of the network negotiation |
2201 |
|
|
algorithm is that this interpretation is different if the header is |
2202 |
|
|
sent by a user agent which supports transparent content |
2203 |
|
|
negotiation. In this case, the interpretation of the header is |
2204 |
|
|
|
2205 |
|
|
`I accept several media types, and assign quality factors from 0.0 |
2206 |
|
|
up to 1.0 to them. If this information is insufficient to make a |
2207 |
|
|
choice on my behalf, do not make a choice but send the list of |
2208 |
|
|
variants'. |
2209 |
|
|
|
2210 |
|
|
The complete absence of an Accept header from the request would be |
2211 |
|
|
interpreted in the same way. |
2212 |
|
|
|
2213 |
|
|
This means that a user agent which supports transparent content |
2214 |
|
|
negotiation can send a minimal request, without any Accept headers |
2215 |
|
|
but with a Negotiate header, by default: |
2216 |
|
|
|
2217 |
|
|
GET /paper HTTP/1.1 |
2218 |
|
|
Host: x.org |
2219 |
|
|
User-Agent: WuxtaWeb/2.4 |
2220 |
|
|
Negotiate: |
2221 |
|
|
|
2222 |
|
|
The sending of this minimal request will never have an adverse |
2223 |
|
|
effect on the quality of the transparent negotiation process: if |
2224 |
|
|
the requested resource happens to be transparently negotiated, the |
2225 |
|
|
user agent will always get a list response, so that it can choose |
2226 |
|
|
the best variant itself. Only the speed of the negotiation process |
2227 |
|
|
can be affected, because servers will no longer be able to cut |
2228 |
|
|
corners by choosing on behalf of the user agent. |
2229 |
|
|
|
2230 |
|
|
If it is found that the requests to a particular origin server |
2231 |
|
|
often return a less efficient list response, the user agent can |
2232 |
|
|
dynamically introduce short Accept headers in its future requests |
2233 |
|
|
to that server, for example |
2234 |
|
|
|
2235 |
|
|
GET /paper HTTP/1.1 |
2236 |
|
|
Host: x.org |
2237 |
|
|
User-Agent: WuxtaWeb/2.4 |
2238 |
|
|
Negotiate: |
2239 |
|
|
Accept: text/html, application/postscript:q=0.8, */* |
2240 |
|
|
Accept-language: en, fr;q=0.5 |
2241 |
|
|
|
2242 |
|
|
This will increase the chance that the network negotiation |
2243 |
|
|
algorithm will have sufficient information to choose on behalf of |
2244 |
|
|
the user agent, thereby optimizing the negotiation process. A good |
2245 |
|
|
strategy for dynamic extension would be to extend the request with |
2246 |
|
|
with those media types, languages, charsets, and feature tags |
2247 |
|
|
mentioned in the variant lists of past list responses from the |
2248 |
|
|
server. The Accept header in the extended request, if present, |
2249 |
|
|
will generally contain "*/*" to indicate that only partial |
2250 |
|
|
information is given in this header. The Accept-Features header, |
2251 |
|
|
if present, will generally contain a "*" for the same reason. |
2252 |
|
|
|
2253 |
|
|
|
2254 |
|
|
12 User agent support for transparent negotiation |
2255 |
|
|
|
2256 |
|
|
This section specifies the requirements a user agent must satisfy |
2257 |
|
|
in order to support transparent negotiation. If the user agent |
2258 |
|
|
contains an internal cache, this cache should satisfy the |
2259 |
|
|
requirements for proxy caches in Section 14. |
2260 |
|
|
|
2261 |
|
|
|
2262 |
|
|
12.1 Handling of responses |
2263 |
|
|
|
2264 |
|
|
If a list response is received when a resource is accessed, the |
2265 |
|
|
user agent must be able to automatically choose, retrieve, and |
2266 |
|
|
display the best variant, or display an error message if it is not |
2267 |
|
|
capable of displaying any of the available variants. The |
2268 |
|
|
negotiation algorithm which chooses the best variant (or chooses to |
2269 |
|
|
display an error message) need not be the network negotiation |
2270 |
|
|
algorithm. |
2271 |
|
|
|
2272 |
|
|
If a choice response or ad hoc response is received when a resource |
2273 |
|
|
is accessed, the usual action is to automatically display the |
2274 |
|
|
enclosed entity. A user agent may however choose to apply its |
2275 |
|
|
(custom) negotiation algorithm to the received variant list, and to |
2276 |
|
|
automatically retrieve and display another variant if the algorithm |
2277 |
|
|
indicates that this other variant has a better quality. |
2278 |
|
|
|
2279 |
|
|
When receiving a choice response, a user agent should check if the |
2280 |
|
|
if the negotiable resource and the chosen variant resource are |
2281 |
|
|
neighbors. If this is not the case, the user agent should reject |
2282 |
|
|
the choice response as a probable spoofing attempt and display an |
2283 |
|
|
error message, for example by internally replacing the choice |
2284 |
|
|
response with a 502 (bad gateway) response. |
2285 |
|
|
|
2286 |
|
|
|
2287 |
|
|
12.2 Presentation of a transparently negotiated resource |
2288 |
|
|
|
2289 |
|
|
If the user agent is displaying, in a main window (i.e. not as an |
2290 |
|
|
embedded or inlined object), a variant as the end result of a |
2291 |
|
|
request on a transparently negotiated resource, the following |
2292 |
|
|
requirements must be met. |
2293 |
|
|
|
2294 |
|
|
1. The user agent should make available though its user interface |
2295 |
|
|
some indication that the resource being displayed is a |
2296 |
|
|
negotiated resource. |
2297 |
|
|
|
2298 |
|
|
2. The user agent should allow the user to review a list of all |
2299 |
|
|
variants bound to the negotiable resource, and to manually |
2300 |
|
|
retrieve another variant if desired. There are two general |
2301 |
|
|
ways of providing such a list. First, the information in the |
2302 |
|
|
Alternates header of the negotiable resource could be used to |
2303 |
|
|
make an annotated menu of variants. Second, the entity |
2304 |
|
|
included in a list response of the negotiable resource could be |
2305 |
|
|
displayed. Note that a list response can always be obtained by |
2306 |
|
|
doing a GET request on the negotiable resource with a Negotiate |
2307 |
|
|
header but without Accept headers. If only this second option |
2308 |
|
|
is provided, the user agent should also provide the user with a |
2309 |
|
|
means to review the real variant list as used by the |
2310 |
|
|
negotiation algorithm (see Section 15.1). |
2311 |
|
|
|
2312 |
|
|
3. If the user agent shows the URI of the displayed information to |
2313 |
|
|
the user, it should be the negotiable resource URI, not the |
2314 |
|
|
variant URI. |
2315 |
|
|
|
2316 |
|
|
4. Similarly, if the user agent stores a reference to the |
2317 |
|
|
displayed information for future use, for example in a hotlist, |
2318 |
|
|
it should store the negotiable resource URI, not the |
2319 |
|
|
variant URI. |
2320 |
|
|
|
2321 |
|
|
It is encouraged, but not required, that some of the above |
2322 |
|
|
functionality is also made available for inlined or embedded |
2323 |
|
|
objects, and when a variant which was selected manually is being |
2324 |
|
|
displayed. |
2325 |
|
|
|
2326 |
|
|
Note: It is not uncommon, for a network protocol specification |
2327 |
|
|
to make requirements on the presentation of the results. The |
2328 |
|
|
first requirement above, and the last part of the second |
2329 |
|
|
requirement, is motivated by security and privacy |
2330 |
|
|
considerations. The rest of the second requirement indicates |
2331 |
|
|
that the ability to manually choose another variant is an |
2332 |
|
|
essential service offered by the protocol: if a user agent does |
2333 |
|
|
not make this service available, it cannot be said to fully |
2334 |
|
|
support transparent content negotiation. The last two |
2335 |
|
|
requirements mean to encourage the correct linking to outside |
2336 |
|
|
negotiable resources by content authors: such correct linking is |
2337 |
|
|
vital for the interoperability of content across sites. |
2338 |
|
|
|
2339 |
|
|
|
2340 |
|
|
13 Origin server support for transparent negotiation |
2341 |
|
|
|
2342 |
|
|
This section covers origin server support from a HTTP viewpoint. |
2343 |
|
|
see Appendix 19.2 for implementation considerations. |
2344 |
|
|
|
2345 |
|
|
|
2346 |
|
|
13.1 Requirements |
2347 |
|
|
|
2348 |
|
|
To implement transparent negotiation on a resource, the origin |
2349 |
|
|
server must be able to send a list response when getting a GET |
2350 |
|
|
request on the resource. It should also be able to send |
2351 |
|
|
appropriate list responses for HEAD requests. The origin server |
2352 |
|
|
must always send a list response for a request with a Negotiate |
2353 |
|
|
header but without Accept headers. |
2354 |
|
|
|
2355 |
|
|
The origin server may also return choice responses and ad hoc |
2356 |
|
|
responses, except in the special case above. The negotiation |
2357 |
|
|
algorithm used need not be the network negotiation algorithm. |
2358 |
|
|
|
2359 |
|
|
Negotiability is a binary property: a resource is either |
2360 |
|
|
transparently negotiated, or it is not. Origin servers should not |
2361 |
|
|
vary the negotiability of a resource, or the variant list bound to |
2362 |
|
|
that resource, based on the request headers which are received. |
2363 |
|
|
The variant list and the property of being negotiated may however |
2364 |
|
|
change through time. The Cache-Control header and the max-age |
2365 |
|
|
directive of the Alternates header can be used to control the |
2366 |
|
|
propagation of such time-dependent changes through caches. |
2367 |
|
|
|
2368 |
|
|
It is the responsibility of the author of the negotiable resource |
2369 |
|
|
to ensure that all resources in the variant list serve the intended |
2370 |
|
|
content, and that the variant resources do not engage in |
2371 |
|
|
transparent content negotiation themselves. |
2372 |
|
|
|
2373 |
|
|
|
2374 |
|
|
13.2 Negotiation on transactions other than GET and HEAD |
2375 |
|
|
|
2376 |
|
|
If a resource is transparently negotiable, this only has an impact |
2377 |
|
|
on the GET and HEAD transactions on the resource. Other |
2378 |
|
|
transactions are not affected. If it is desired that transparent |
2379 |
|
|
content negotiation is done on, for example, the end result of a |
2380 |
|
|
POST request, then a 303 (See Other) POST response which redirects |
2381 |
|
|
to a negotiable resource could be generated. See the HTTP/1.1 |
2382 |
|
|
specification [1] for details. |
2383 |
|
|
|
2384 |
|
|
|
2385 |
|
|
14 Proxy support for transparent negotiation |
2386 |
|
|
|
2387 |
|
|
Transparent content negotiation is designed to work through proxies |
2388 |
|
|
which only implement the HTTP/1.1 specification [1]. Thus, in a |
2389 |
|
|
sense, all HTTP/1.1 proxies support transparent content |
2390 |
|
|
negotiation. |
2391 |
|
|
|
2392 |
|
|
Plain HTTP/1.1 allows proxies to cache list, choice, and ad hoc |
2393 |
|
|
responses, and to efficiently revalidate them by using the |
2394 |
|
|
If-None-Match header. This specification defines additional |
2395 |
|
|
optimization mechanisms. |
2396 |
|
|
|
2397 |
|
|
First, a proxy may cache and reuse an Alternates header bound to a |
2398 |
|
|
negotiable resource (Section 10.3). If it is fresh or first-hand, |
2399 |
|
|
the Alternates header may be reused to negotiate on behalf of the |
2400 |
|
|
user agent or origin server and to construct choice responses |
2401 |
|
|
(Section 10.2). Proxies must not use custom negotiation |
2402 |
|
|
algorithms, they may only use the network negotiation algorithm. |
2403 |
|
|
|
2404 |
|
|
Second, if a proxy receives a choice response, it may extract and |
2405 |
|
|
cache the normal response embedded therein, as described in |
2406 |
|
|
Section 10.4. |
2407 |
|
|
|
2408 |
|
|
|
2409 |
|
|
15 Security and privacy considerations |
2410 |
|
|
|
2411 |
|
|
15.1 Accept headers revealing information of a private nature |
2412 |
|
|
|
2413 |
|
|
Accept headers, in particular Accept-Language headers, may reveal |
2414 |
|
|
information which the user would rather keep private unless it will |
2415 |
|
|
directly improve the quality of service. For example, a user may |
2416 |
|
|
not want to send language preferences to sites which do not offer |
2417 |
|
|
multi-lingual content. The transparent content negotiation |
2418 |
|
|
mechanism allows user agents to omit sending of the Accept-Language |
2419 |
|
|
header by default, without this affecting the outcome of the |
2420 |
|
|
negotiation process if transparently negotiated multi-lingual |
2421 |
|
|
content is accessed. |
2422 |
|
|
|
2423 |
|
|
However, even if Accept headers are never sent, the automatic |
2424 |
|
|
selection and retrieval of a variant by a user agent will reveal a |
2425 |
|
|
preference for this variant to the server. A malicious service |
2426 |
|
|
author could provide a page with `fake' negotiability on |
2427 |
|
|
(ethnicity-correlated) languages, with all variants actually being |
2428 |
|
|
the same English document, as a means of obtaining |
2429 |
|
|
privacy-sensitive information. Such a plot would however be |
2430 |
|
|
visible to an alert victim if the list of available variants and |
2431 |
|
|
their properties is reviewed. |
2432 |
|
|
|
2433 |
|
|
Some additional privacy considerations connected to Accept headers |
2434 |
|
|
are discussed in [1]. |
2435 |
|
|
|
2436 |
|
|
|
2437 |
|
|
15.2 Spoofing of responses from variant resources |
2438 |
|
|
|
2439 |
|
|
The caching optimization in Section 10.4 gives the implementer of a |
2440 |
|
|
negotiable resource control over the responses cached for all of |
2441 |
|
|
its variant resources which are neighbors. This is a security |
2442 |
|
|
problem if a neighboring variant resource belongs to another |
2443 |
|
|
author. To provide security in this case, the HTTP server will |
2444 |
|
|
have to filter the Content-Location headers in the choice responses |
2445 |
|
|
generated by the negotiable resource implementation. |
2446 |
|
|
|
2447 |
|
|
|
2448 |
|
|
16 Acknowledgments |
2449 |
|
|
|
2450 |
|
|
Work on HTTP content negotiation has been done since at least 1993. |
2451 |
|
|
The author is unable to trace the origin of many of the ideas |
2452 |
|
|
incorporated in this document. This document builds on an earlier |
2453 |
|
|
specification of content negotiation as recorded in [2]. Many |
2454 |
|
|
members of the HTTP working group have contributed to the work |
2455 |
|
|
reflected in this document. The authors wish to thank the |
2456 |
|
|
individuals who have commented on earlier versions of this |
2457 |
|
|
document, including Brian Behlendorf, Daniel DuBois, Larry |
2458 |
|
|
Masinter, and Roy T. Fielding. |
2459 |
|
|
|
2460 |
|
|
|
2461 |
|
|
17 References |
2462 |
|
|
|
2463 |
|
|
[1] Fielding et al, Hypertext Transfer Protocol -- HTTP/1.1. |
2464 |
|
|
Internet-Draft draft-ietf-http-v11-spec-06.txt, HTTP Working |
2465 |
|
|
Group, July 4, 1996 |
2466 |
|
|
|
2467 |
|
|
[2] Roy T. Fielding, Henrik Frystyk Nielsen, and Tim Berners-Lee. |
2468 |
|
|
Hypertext Transfer Protocol -- HTTP/1.1. Internet-Draft |
2469 |
|
|
draft-ietf-http-v11-spec-01.txt, HTTP Working Group, January, |
2470 |
|
|
1996. |
2471 |
|
|
|
2472 |
|
|
[3] T. Berners-Lee, R. Fielding, H. Frystyk, Hypertext Transfer |
2473 |
|
|
Protocol -- HTTP/1.0. RFC 1945. MIT/LCS, UC Irvine, May 1996. |
2474 |
|
|
|
2475 |
|
|
|
2476 |
|
|
18 Author's address |
2477 |
|
|
|
2478 |
|
|
Koen Holtman |
2479 |
|
|
Technische Universiteit Eindhoven |
2480 |
|
|
Postbus 513 |
2481 |
|
|
Kamer HG 6.57 |
2482 |
|
|
5600 MB Eindhoven (The Netherlands) |
2483 |
|
|
Email: koen@win.tue.nl |
2484 |
|
|
|
2485 |
|
|
Andrew H. Mutz |
2486 |
|
|
Hewlett-Packard Company |
2487 |
|
|
1501 Page Mill Road 3U-3 |
2488 |
|
|
Palo Alto CA 94304, USA |
2489 |
|
|
Fax +1 415 857 4691 |
2490 |
|
|
Email: mutz@hpl.hp.com |
2491 |
|
|
|
2492 |
|
|
|
2493 |
|
|
|
2494 |
|
|
19 Appendices |
2495 |
|
|
|
2496 |
|
|
19.1 Adding an Expires header to ensure HTTP/1.0 compatibility |
2497 |
|
|
|
2498 |
|
|
To ensure compatibility with HTTP/1.0 caching proxies which do not |
2499 |
|
|
recognize the Vary header, an Expires header with a date in the |
2500 |
|
|
past can be be added to the response, for example |
2501 |
|
|
|
2502 |
|
|
Expires: Thu, 01 Jan 1980 00:00:00 GMT |
2503 |
|
|
|
2504 |
|
|
If this is done by an origin server, it should usually also include |
2505 |
|
|
a Cache-Control header for the benefit of HTTP/1.1 caches, for |
2506 |
|
|
example |
2507 |
|
|
|
2508 |
|
|
Cache-Control: max-age=604800 |
2509 |
|
|
|
2510 |
|
|
which overrides the freshness lifetime of zero seconds specified by |
2511 |
|
|
the included Expires header. |
2512 |
|
|
|
2513 |
|
|
|
2514 |
|
|
19.2 Origin server implementation considerations |
2515 |
|
|
|
2516 |
|
|
19.2.1 Implementation with a CGI script |
2517 |
|
|
|
2518 |
|
|
Transparent content negotiation has been designed to allow a broad |
2519 |
|
|
range of implementation options at the origin server side. A very |
2520 |
|
|
minimal implementation can be done using the CGI interface. The |
2521 |
|
|
CGI script below is an example. |
2522 |
|
|
|
2523 |
|
|
#!/bin/sh |
2524 |
|
|
|
2525 |
|
|
if set | grep "^HTTP_NEGOTIATE=" >/dev/null; then |
2526 |
|
|
echo Status: 300 Multiple Choices |
2527 |
|
|
fi |
2528 |
|
|
|
2529 |
|
|
cat - <<'blex' |
2530 |
|
|
Alternates: {"stats.tables.html" 1.0 {type text/html} {features |
2531 |
|
|
tables}}, {"stats.html" 0.8 {type text/html}}, {"stats.ps" 0.95 |
2532 |
|
|
{type application/postscript}} |
2533 |
|
|
Vary: * |
2534 |
|
|
Content-Type: text/html |
2535 |
|
|
|
2536 |
|
|
<title>Multiple Choices for Web Statistics</title> |
2537 |
|
|
<h2>Multiple Choices for Web Statistics:</h2> |
2538 |
|
|
<ul> |
2539 |
|
|
<li><a href=stats.tables.html>Version with HTML tables</a> |
2540 |
|
|
<p> |
2541 |
|
|
<li><a href=stats.html>Version without HTML tables</a> |
2542 |
|
|
<p> |
2543 |
|
|
<li><a href=stats.ps>Postscript version</a> |
2544 |
|
|
</ul> |
2545 |
|
|
blex |
2546 |
|
|
|
2547 |
|
|
The Alternates header in the above script must be read as a single |
2548 |
|
|
line. The script generates a list response for user agents capable |
2549 |
|
|
of transparent content negotiation, and an ad hoc 200 (OK) response |
2550 |
|
|
for all non-negotiating agents. |
2551 |
|
|
|
2552 |
|
|
19.2.2 Direct support by HTTP servers |
2553 |
|
|
|
2554 |
|
|
Sophisticated HTTP servers could make a transparent negotiation |
2555 |
|
|
module available to content authors. Such a module could |
2556 |
|
|
incorporate implementations of the network negotiation algorithm |
2557 |
|
|
(Section 11) and the algorithm for generating choice responses |
2558 |
|
|
(Section 10.2). The definition of interfaces to such modules is |
2559 |
|
|
beyond the scope of this document. |
2560 |
|
|
|
2561 |
|
|
19.2.3 Web publishing tools |
2562 |
|
|
|
2563 |
|
|
Web publishing tools could automatically generate several variants |
2564 |
|
|
of a document (for example the original TeX version, a HTML version |
2565 |
|
|
with tables, a HTML version without tables, and a Postscript |
2566 |
|
|
version), together with an appropriate variant list in the |
2567 |
|
|
interface format of a HTTP server transparent negotiation module. |
2568 |
|
|
This would allow documents to be published as transparently |
2569 |
|
|
negotiable resources. |
2570 |
|
|
|
2571 |
|
|
|
2572 |
|
|
19.3 Open issues in transparent content negotiation |
2573 |
|
|
|
2574 |
|
|
At the time of writing of this specification, the following issues |
2575 |
|
|
are still open. |
2576 |
|
|
|
2577 |
|
|
- The feature tag registration process has yet to be defined. |
2578 |
|
|
|
2579 |
|
|
- A core set of feature tags (Section 8.2) has not yet been |
2580 |
|
|
defined, though there has been some related work on display |
2581 |
|
|
attributes, see Appendix 19.4.1. |
2582 |
|
|
|
2583 |
|
|
- Though it is expected that the feature negotiation framework will |
2584 |
|
|
solve many current and future negotiation problems, it is also |
2585 |
|
|
expected that there will remain current and future negotiation |
2586 |
|
|
problems not solved by feature negotiation. Currently, there is |
2587 |
|
|
little experience in this area. |
2588 |
|
|
|
2589 |
|
|
|
2590 |
|
|
19.3B Server-side rendering engines |
2591 |
|
|
|
2592 |
|
|
Cache efficiency considerations generally demand that content |
2593 |
|
|
negotiation is limited to a few variants, and that any fine-tuning |
2594 |
|
|
of a representation (for example the scaling of a title image to |
2595 |
|
|
fit the exact screen width) is done at the user agent side. |
2596 |
|
|
|
2597 |
|
|
However, some negotiation models may demand the use of server-side |
2598 |
|
|
rendering engines, which fine-tune a representation depending on |
2599 |
|
|
exact parameters supplied by the user agent. This appendix |
2600 |
|
|
discusses how to extend the transparent negotiation framework with |
2601 |
|
|
a mechanism for reliably delivering such parameters to the server. |
2602 |
|
|
|
2603 |
|
|
The variant description syntax can be extended with an optional |
2604 |
|
|
sent-tags attribute: |
2605 |
|
|
|
2606 |
|
|
sent-tags-attribute = "{" "send-tags" 1%ftag "}" |
2607 |
|
|
|
2608 |
|
|
The presence of this attribute would indicate that the variant URI |
2609 |
|
|
gives access to a server side rendering engine. An example variant |
2610 |
|
|
description is: |
2611 |
|
|
|
2612 |
|
|
{"paper.server-render.ps" 1.0 {type application/postscript} |
2613 |
|
|
{send-tags paper-size dpi printcolor print-gamma}} |
2614 |
|
|
|
2615 |
|
|
If this variant is chosen as the best variant and retrieved in a |
2616 |
|
|
GET request, the user agent would extend the |
2617 |
|
|
paper.server-render.ps URI with those feature tags in the |
2618 |
|
|
send-tags attribute it supports, and their associated preferred |
2619 |
|
|
values if applicable: |
2620 |
|
|
|
2621 |
|
|
GET paper.server-render.ps?paper-size=A4&dpi=600 HTTP/1.1 |
2622 |
|
|
|
2623 |
|
|
Thus, the exact rendering parameters end up at the server side |
2624 |
|
|
rendering engine. The URI is extended using the form submission |
2625 |
|
|
syntax for downwards compatibility reasons: this allows the list |
2626 |
|
|
response to contain a HTML form giving access to the engine. |
2627 |
|
|
|
2628 |
|
|
Server-side rendering engines may by interesting as a fallback |
2629 |
|
|
mechanism when new client-side rendering engines are introduced. |
2630 |
|
|
The following variant list illustrates this: |
2631 |
|
|
|
2632 |
|
|
{"paper.html" 0.8 {type text/html}}, |
2633 |
|
|
{"paper.tex" 1.0 {type application/x-tex} |
2634 |
|
|
{features client-render-tex}}, |
2635 |
|
|
{"paper.server-render.ps" 1.0 {type application/postscript} |
2636 |
|
|
{features !client-render-tex} |
2637 |
|
|
{send-tags paper-size dpi printcolor print-gamma}} |
2638 |
|
|
|
2639 |
|
|
|
2640 |
|
|
19.3C Quality factors in the Accept-Features header |
2641 |
|
|
|
2642 |
|
|
The feature negotiation framework specified in Section 6 does not |
2643 |
|
|
allow for the introduction of new dimensions like the type and |
2644 |
|
|
language dimension, in which the user can express a relative |
2645 |
|
|
preference for each of the elements by sending quality factors in |
2646 |
|
|
the Accept header. To support the introduction of such dimensions, |
2647 |
|
|
the Accept-Features header syntax could be extended with quality |
2648 |
|
|
factors. An example would be the following Accept-Features header: |
2649 |
|
|
|
2650 |
|
|
Accept-Features: paper=a4;q=1.0, paper=a5;q=0.8, !paper=a3, * |
2651 |
|
|
|
2652 |
|
|
Examples of overall quality factors computed using this header |
2653 |
|
|
would be: |
2654 |
|
|
|
2655 |
|
|
0.8 for {"x" 1.0 {features paper=a5}} |
2656 |
|
|
1.0 for {"y" 1.0 {features paper=a4/0.95}} |
2657 |
|
|
0.0 for {"z" 1.0 {features paper=a3}} |
2658 |
|
|
|
2659 |
|
|
Quality factors could also be useful on value-less feature tags, |
2660 |
|
|
for example |
2661 |
|
|
|
2662 |
|
|
Accept-Features: tables, larger_2x;q=0.7, * |
2663 |
|
|
|
2664 |
|
|
would degrade the overall quality of any variant which uses the |
2665 |
|
|
`larger_2x' feature with a factor of 0.7. The quality factor on |
2666 |
|
|
`larger_2x' would express the relative preference of getting a |
2667 |
|
|
variant which is about twice as large as the smallest variant. |
2668 |
|
|
Examples of overall quality factors computed using this header |
2669 |
|
|
would be: |
2670 |
|
|
|
2671 |
|
|
0.8 for {"small" 0.8 {features tables}} |
2672 |
|
|
0.7 for {"large" 1.0 {features tables larger_2x/1}} |
2673 |
|
|
|
2674 |
|
|
In this example, the small variant is chosen: the resource author |
2675 |
|
|
assigned a lower source quality to the small variant, but the |
2676 |
|
|
difference in source quality was not big enough to offset the |
2677 |
|
|
user's dislike of getting a variant which is twice as large. Note |
2678 |
|
|
that the `/1' causes user agents which do not recognize the |
2679 |
|
|
`larger_2x' tag to select the large variant. |
2680 |
|
|
|
2681 |
|
|
The proposed semantics for quality factors on feature tags are as |
2682 |
|
|
follows. First, the Accept-Features headers element |
2683 |
|
|
|
2684 |
|
|
ftag;q=Q |
2685 |
|
|
|
2686 |
|
|
assigns the quality factor Q to the feature predicate `ftag' made |
2687 |
|
|
true by it, and the elements |
2688 |
|
|
|
2689 |
|
|
ftag=V;q=Q ftag={V};q=Q ftag<=N;q=Q |
2690 |
|
|
|
2691 |
|
|
assign the quality value Q to all feature predicates `ftag=X' made |
2692 |
|
|
true by them, but not to the plain predicate `ftag'. All true |
2693 |
|
|
feature predicates not explicitly assigned a quality factor get the |
2694 |
|
|
default factor 1. |
2695 |
|
|
|
2696 |
|
|
To account for the quality factors on the feature tags, the overall |
2697 |
|
|
quality of the variant is multiplied with the quality factor |
2698 |
|
|
of every `active feature predicate' in the variant description. |
2699 |
|
|
A predicate is active if it |
2700 |
|
|
|
2701 |
|
|
1. is made true by the Accept-Features header |
2702 |
|
|
|
2703 |
|
|
2. does not start with ! |
2704 |
|
|
|
2705 |
|
|
3. and, if appearing in an fpred-bag, does not appear after |
2706 |
|
|
another predicate which also satisfies 1. and 2. |
2707 |
|
|
|
2708 |
|
|
As an example, with |
2709 |
|
|
|
2710 |
|
|
Accept-Features: aa, !bb, cc;q=0.7, dd, * |
2711 |
|
|
|
2712 |
|
|
the variant described as |
2713 |
|
|
|
2714 |
|
|
{"x" 1.0 {features aa/0.8 !xx !bb [!yy cc dd]}} |
2715 |
|
|
|
2716 |
|
|
has the active feature predicates `aa' and `cc', while the `!bb' |
2717 |
|
|
and `dd' predicates are not active. |
2718 |
|
|
|
2719 |
|
|
Note: If a user sends quality factors with feature tags not |
2720 |
|
|
specifically designed to have them, this will in general not |
2721 |
|
|
produce improved negotiation results. For example, depending |
2722 |
|
|
on the particular variant list, sending `animated_gifs;q=0.8' |
2723 |
|
|
to express a mild dislike of animated gifs can easily fail to |
2724 |
|
|
be effective. Sending `!animated_gives' could be a bit more |
2725 |
|
|
effective, but only a user agent configuration option which |
2726 |
|
|
completely disables animated gifs can deliver good results in |
2727 |
|
|
all cases. |
2728 |
|
|
|
2729 |
|
|
|
2730 |
|
|
|
2731 |
|
|
19.4 Other negotiation specifications |
2732 |
|
|
|
2733 |
|
|
19.4.1 User-Agent Display Attributes |
2734 |
|
|
|
2735 |
|
|
(Comments based on the internet draft |
2736 |
|
|
draft-mutz-http-attributes-01.txt.) |
2737 |
|
|
|
2738 |
|
|
User-Agent Display Attributes provide a means for an HTTP client to |
2739 |
|
|
inform a server about its display capabilities. The draft |
2740 |
|
|
mentioned above defines a number of such attributes as feature |
2741 |
|
|
tags. |
2742 |
|
|
|
2743 |
|
|
19.4.2 HTTP/1.2 Extension Protocol (PEP) |
2744 |
|
|
|
2745 |
|
|
(Comments based on the internet draft draft-ietf-http-pep-02.txt.) |
2746 |
|
|
|
2747 |
|
|
PEP is a system for HTTP clients, servers, and proxies to reliably |
2748 |
|
|
reason about custom extensions to HTTP. Its purpose places PEP one |
2749 |
|
|
meta-level above transparent content negotiation, which is intended |
2750 |
|
|
as a (standardized) extension of HTTP. |
2751 |
|
|
|
2752 |
|
|
Transparent content negotiation and HTTP/1.1 were both carefully |
2753 |
|
|
designed to work together without requiring meta-negotiation. |
2754 |
|
|
Therefore, transparent content negotiation does not require or rely |
2755 |
|
|
on the use of PEP. |
2756 |
|
|
|
2757 |
|
|
Though PEP and transparent content negotiation both offer |
2758 |
|
|
extensible negotiation frameworks, they operate in different areas |
2759 |
|
|
of negotiation. PEP negotiates on the use of mutually understood |
2760 |
|
|
protocol extensions, while transparent content negotiation is a |
2761 |
|
|
method for efficiently retrieving the best representation of some |
2762 |
|
|
information. Thus, deployment and use of PEP is orthogonal to |
2763 |
|
|
deployment and use of transparent content negotiation. |
2764 |
|
|
|
2765 |
|
|
Though some elements of PEP resemble some elements of transparent |
2766 |
|
|
content negotiation, it does not seem advantageous to attempt to |
2767 |
|
|
generalize (parts of) both specifications in order to allow sharing |
2768 |
|
|
of code by implementations. The two specifications seem to have |
2769 |
|
|
more unrelated parts than similar parts. |
2770 |
|
|
|
2771 |
|
|
|
2772 |
|
|
19.5 Related issues |
2773 |
|
|
|
2774 |
|
|
19.5.1 Current negotiation practice |
2775 |
|
|
|
2776 |
|
|
In current practice, most user agents send short Accept headers in |
2777 |
|
|
every request. These headers usually inadequately describe the |
2778 |
|
|
user agent capabilities and user preferences, except maybe for |
2779 |
|
|
inline image requests. Servers providing multiple representations |
2780 |
|
|
of the same information usually do so under different URIs, and |
2781 |
|
|
allow users to manually select a representation by clicking a |
2782 |
|
|
particular link. |
2783 |
|
|
|
2784 |
|
|
Some HTTP servers implement extensive negotiation capabilities |
2785 |
|
|
based on HTTP/1.0 headers. However, with current user agents, |
2786 |
|
|
these capabilities can seldom be used effectively. |
2787 |
|
|
|
2788 |
|
|
Some origin servers use the contents of the User-Agent request |
2789 |
|
|
header for negotiation purposes. These contents sometimes allow |
2790 |
|
|
the server to infer information about capabilities which cannot be |
2791 |
|
|
expressed with the existing Accept headers. |
2792 |
|
|
|
2793 |
|
|
Some sites use Netscape cookies (persistent client state http |
2794 |
|
|
cookies) to implement a user preferences mechanism. |
2795 |
|
|
|
2796 |
|
|
19.5.2 Bandwidth negotiation |
2797 |
|
|
|
2798 |
|
|
With a bandwidth negotiation mechanism, the time needed to retrieve |
2799 |
|
|
a particular variant over the network can be taken into account |
2800 |
|
|
during the negotiation process. Work on mechanisms for bandwidth |
2801 |
|
|
negotiation has been done since at least 1993, but this work has |
2802 |
|
|
not yet yielded a successful standard mechanism for bandwidth |
2803 |
|
|
negotiation. Cascaded proxy caches introduce additional complexity |
2804 |
|
|
in this area. |
2805 |
|
|
|
2806 |
|
|
This specification does not attempt to solve the problem of |
2807 |
|
|
bandwidth negotiation. There is some hope that the feature |
2808 |
|
|
negotiation framework will allow the introduction of an adequate |
2809 |
|
|
solution for bandwidth negotiation. |
2810 |
|
|
|
2811 |
|
|
|
2812 |
|
|
|
2813 |
|
|
Expires: March 6, 1997 |
2814 |
|
|
|