Changeset 745 for draft-ietf-httpbis/latest/p3-payload.xml
- Timestamp:
- 15/01/10 10:04:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p3-payload.xml
r741 r745 807 807 <section title="Content Negotiation" anchor="content.negotiation"> 808 808 <t> 809 Most HTTP responses include an entity which contains information for 810 interpretation by a human user. Naturally, it is desirable to supply 811 the user with the "best available" entity corresponding to the 812 request. Unfortunately for servers and caches, not all users have the 813 same preferences for what is "best," and not all user agents are 814 equally capable of rendering all entity types. For that reason, HTTP 815 has provisions for several mechanisms for "content negotiation" -- 816 the process of selecting the best representation for a given response 817 when there are multiple representations available. 818 </t> 819 <x:note> 820 <t> 821 <x:h>Note:</x:h> This is not called "format negotiation" because the 822 alternate representations may be of the same media type, but use 823 different capabilities of that type, be in different languages, 824 etc. 825 </t> 826 </x:note> 827 <t> 828 Any response containing an entity-body &MAY; be subject to negotiation, 829 including error responses. 830 </t> 831 <t> 832 There are two kinds of content negotiation which are possible in 833 HTTP: server-driven and agent-driven negotiation. These two kinds of 834 negotiation are orthogonal and thus may be used separately or in 835 combination. One method of combination, referred to as transparent 836 negotiation, occurs when a cache uses the agent-driven negotiation 837 information provided by the origin server in order to provide 838 server-driven negotiation for subsequent requests. 809 HTTP responses include a representation which contains information for 810 interpretation, whether by a human user or for further processing. 811 Often, the server has different ways of representing the 812 same information; for example, in different formats, languages, 813 or using different character encodings. 814 </t> 815 <t> 816 HTTP clients and their users might have different or variable 817 capabilities, characteristics or preferences which would influence 818 which representation, among those available from the server, 819 would be best for the server to deliver. For this reason, HTTP 820 provides mechanisms for "content negotiation" -- a process of 821 allowing selection of a representation of a given resource, 822 when more than one is available. 823 </t> 824 <t> 825 This specification defines two patterns of content negotiation; 826 "server-driven", where the server selects the representation based 827 upon the client's stated preferences, and "agent-driven" negotiation, 828 where the server provides a list of representations for the client to 829 choose from, based upon their metadata. In addition, there are 830 other patterns: some applications use an "active content" pattern, 831 where the server returns active content which runs on the client 832 and, based on client available parameters, selects additional 833 resources to invoke. "Transparent Content Negotiation" (<xref target="RFC2295"/>) 834 has also been proposed. 835 </t> 836 <t> 837 These patterns are all widely used, and have trade-offs in applicability 838 and practicality. In particular, when the number of preferences or 839 capabilities to be expressed by a client are large (such as when many 840 different formats are supported by a user-agent), server-driven 841 negotiation becomes unwieldy, and may not be appropriate. Conversely, 842 when the number of representations to choose from is very large, 843 agent-driven negotiation may not be appropriate. 844 </t> 845 <t> 846 Note that in all cases, the supplier of representations has the 847 responsibility for determining which representations might be 848 considered to be the "same information". 839 849 </t> 840 850 … … 891 901 capabilities and user preferences: Accept (<xref target="header.accept"/>), Accept-Charset 892 902 (<xref target="header.accept-charset"/>), Accept-Encoding (<xref target="header.accept-encoding"/>), Accept-Language 893 (<xref target="header.accept-language"/>), and User-Agent (&header-user-agent;). However, an894 origin server is not limited to these dimensions and &MAY; vary the895 response based on any aspect of the request, including information903 (<xref target="header.accept-language"/>), and User-Agent (&header-user-agent;). 904 However, an origin server is not limited to these dimensions and &MAY; vary 905 the response based on any aspect of the request, including information 896 906 outside the request-header fields or within extension header fields 897 907 not defined by this specification. 898 908 </t> 909 <x:note> 910 <t> 911 <x:h>Note:</x:h> In practice, User-Agent based negotiation is fragile, 912 because new clients might not be recognized. 913 </t> 914 </x:note> 899 915 <t> 900 916 The Vary header field (&header-vary;) can be used to express the parameters the … … 933 949 </t> 934 950 <t> 935 HTTP/1.1defines the 300 (Multiple Choices) and 406 (Not Acceptable)951 This specification defines the 300 (Multiple Choices) and 406 (Not Acceptable) 936 952 status codes for enabling agent-driven negotiation when the server is 937 953 unwilling or unable to provide a varying response using server-driven 938 954 negotiation. 939 </t>940 </section>941 942 <section title="Transparent Negotiation" anchor="transparent.negotiation">943 <t>944 Transparent negotiation is a combination of both server-driven and945 agent-driven negotiation. When a cache is supplied with a form of the946 list of available representations of the response (as in agent-driven947 negotiation) and the dimensions of variance are completely understood948 by the cache, then the cache becomes capable of performing server-driven949 negotiation on behalf of the origin server for subsequent950 requests on that resource.951 </t>952 <t>953 Transparent negotiation has the advantage of distributing the954 negotiation work that would otherwise be required of the origin955 server and also removing the second request delay of agent-driven956 negotiation when the cache is able to correctly guess the right957 response.958 </t>959 <t>960 This specification does not define any mechanism for transparent961 negotiation, though it also does not prevent any such mechanism from962 being developed as an extension that could be used within HTTP/1.1.963 955 </t> 964 956 </section> … … 2283 2275 </reference> 2284 2276 2277 <reference anchor='RFC2295'> 2278 <front> 2279 <title abbrev='HTTP Content Negotiation'>Transparent Content Negotiation in HTTP</title> 2280 <author initials='K.' surname='Holtman' fullname='Koen Holtman'> 2281 <organization>Technische Universiteit Eindhoven</organization> 2282 <address> 2283 <email>koen@win.tue.nl</email> 2284 </address> 2285 </author> 2286 <author initials='A.H.' surname='Mutz' fullname='Andrew H. Mutz'> 2287 <organization>Hewlett-Packard Company</organization> 2288 <address> 2289 <email>mutz@hpl.hp.com</email> 2290 </address> 2291 </author> 2292 <date year='1998' month='March'/> 2293 </front> 2294 <seriesInfo name='RFC' value='2295'/> 2295 </reference> 2296 2285 2297 <reference anchor="RFC2388"> 2286 2298 <front> … … 3079 3091 <list style="symbols"> 3080 3092 <t> 3093 <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/81"/>: 3094 "Content Negotiation for media types" 3095 </t> 3096 <t> 3081 3097 <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/181"/>: 3082 3098 "Accept-Language: which RFC4647 filtering?"
Note: See TracChangeset
for help on using the changeset viewer.