1 | <?xml version="1.0" encoding="utf-8"?> |
---|
2 | <?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?> |
---|
3 | <!DOCTYPE rfc [ |
---|
4 | <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>"> |
---|
5 | <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>"> |
---|
6 | <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>"> |
---|
7 | <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>"> |
---|
8 | <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>"> |
---|
9 | <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>"> |
---|
10 | <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>"> |
---|
11 | <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>"> |
---|
12 | <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>"> |
---|
13 | <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>"> |
---|
14 | <!ENTITY ID-VERSION "latest"> |
---|
15 | <!ENTITY ID-MONTH "January"> |
---|
16 | <!ENTITY ID-YEAR "2008"> |
---|
17 | <!ENTITY messaging "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
18 | <!ENTITY header-if-range "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
19 | <!ENTITY header-range "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
20 | <!ENTITY header-vary "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
21 | <!ENTITY clockless "<xref target='Part1' x:rel='#clockless.origin.server.operation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> |
---|
22 | ]> |
---|
23 | <?rfc toc="yes" ?> |
---|
24 | <?rfc symrefs="yes" ?> |
---|
25 | <?rfc sortrefs="yes" ?> |
---|
26 | <?rfc compact="yes"?> |
---|
27 | <?rfc subcompact="no" ?> |
---|
28 | <?rfc linkmailto="no" ?> |
---|
29 | <?rfc editing="no" ?> |
---|
30 | <?rfc-ext allow-markup-in-artwork="yes" ?> |
---|
31 | <?rfc-ext include-references-in-index="yes" ?> |
---|
32 | <rfc obsoletes="2068, 2616" category="std" |
---|
33 | ipr="full3978" docName="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" |
---|
34 | xmlns:x='http://purl.org/net/xml2rfc/ext' xmlns:ed="http://greenbytes.de/2002/rfcedit"> |
---|
35 | <front> |
---|
36 | |
---|
37 | <title abbrev="HTTP/1.1, Part 4">HTTP/1.1, part 4: Conditional Requests</title> |
---|
38 | |
---|
39 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
40 | <organization abbrev="Day Software">Day Software</organization> |
---|
41 | <address> |
---|
42 | <postal> |
---|
43 | <street>23 Corporate Plaza DR, Suite 280</street> |
---|
44 | <city>Newport Beach</city> |
---|
45 | <region>CA</region> |
---|
46 | <code>92660</code> |
---|
47 | <country>USA</country> |
---|
48 | </postal> |
---|
49 | <phone>+1-949-706-5300</phone> |
---|
50 | <facsimile>+1-949-706-5305</facsimile> |
---|
51 | <email>fielding@gbiv.com</email> |
---|
52 | <uri>http://roy.gbiv.com/</uri> |
---|
53 | </address> |
---|
54 | </author> |
---|
55 | |
---|
56 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
57 | <organization>One Laptop per Child</organization> |
---|
58 | <address> |
---|
59 | <postal> |
---|
60 | <street>21 Oak Knoll Road</street> |
---|
61 | <city>Carlisle</city> |
---|
62 | <region>MA</region> |
---|
63 | <code>01741</code> |
---|
64 | <country>USA</country> |
---|
65 | </postal> |
---|
66 | <email>jg@laptop.org</email> |
---|
67 | <uri>http://www.laptop.org/</uri> |
---|
68 | </address> |
---|
69 | </author> |
---|
70 | |
---|
71 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
72 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
73 | <address> |
---|
74 | <postal> |
---|
75 | <street>HP Labs, Large Scale Systems Group</street> |
---|
76 | <street>1501 Page Mill Road, MS 1177</street> |
---|
77 | <city>Palo Alto</city> |
---|
78 | <region>CA</region> |
---|
79 | <code>94304</code> |
---|
80 | <country>USA</country> |
---|
81 | </postal> |
---|
82 | <email>JeffMogul@acm.org</email> |
---|
83 | </address> |
---|
84 | </author> |
---|
85 | |
---|
86 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
87 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
88 | <address> |
---|
89 | <postal> |
---|
90 | <street>1 Microsoft Way</street> |
---|
91 | <city>Redmond</city> |
---|
92 | <region>WA</region> |
---|
93 | <code>98052</code> |
---|
94 | <country>USA</country> |
---|
95 | </postal> |
---|
96 | <email>henrikn@microsoft.com</email> |
---|
97 | </address> |
---|
98 | </author> |
---|
99 | |
---|
100 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
101 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
102 | <address> |
---|
103 | <postal> |
---|
104 | <street>345 Park Ave</street> |
---|
105 | <city>San Jose</city> |
---|
106 | <region>CA</region> |
---|
107 | <code>95110</code> |
---|
108 | <country>USA</country> |
---|
109 | </postal> |
---|
110 | <email>LMM@acm.org</email> |
---|
111 | <uri>http://larry.masinter.net/</uri> |
---|
112 | </address> |
---|
113 | </author> |
---|
114 | |
---|
115 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
116 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
117 | <address> |
---|
118 | <postal> |
---|
119 | <street>1 Microsoft Way</street> |
---|
120 | <city>Redmond</city> |
---|
121 | <region>WA</region> |
---|
122 | <code>98052</code> |
---|
123 | </postal> |
---|
124 | <email>paulle@microsoft.com</email> |
---|
125 | </address> |
---|
126 | </author> |
---|
127 | |
---|
128 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
129 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
130 | <address> |
---|
131 | <postal> |
---|
132 | <street>MIT Computer Science and Artificial Intelligence Laboratory</street> |
---|
133 | <street>The Stata Center, Building 32</street> |
---|
134 | <street>32 Vassar Street</street> |
---|
135 | <city>Cambridge</city> |
---|
136 | <region>MA</region> |
---|
137 | <code>02139</code> |
---|
138 | <country>USA</country> |
---|
139 | </postal> |
---|
140 | <email>timbl@w3.org</email> |
---|
141 | <uri>http://www.w3.org/People/Berners-Lee/</uri> |
---|
142 | </address> |
---|
143 | </author> |
---|
144 | |
---|
145 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
146 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
147 | <address> |
---|
148 | <postal> |
---|
149 | <street>W3C / ERCIM</street> |
---|
150 | <street>2004, rte des Lucioles</street> |
---|
151 | <city>Sophia-Antipolis</city> |
---|
152 | <region>AM</region> |
---|
153 | <code>06902</code> |
---|
154 | <country>France</country> |
---|
155 | </postal> |
---|
156 | <email>ylafon@w3.org</email> |
---|
157 | <uri>http://www.raubacapeu.net/people/yves/</uri> |
---|
158 | </address> |
---|
159 | </author> |
---|
160 | |
---|
161 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
162 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
163 | <address> |
---|
164 | <postal> |
---|
165 | <street>Hafenweg 16</street> |
---|
166 | <city>Muenster</city><region>NW</region><code>48155</code> |
---|
167 | <country>Germany</country> |
---|
168 | </postal> |
---|
169 | <phone>+49 251 2807760</phone> |
---|
170 | <facsimile>+49 251 2807761</facsimile> |
---|
171 | <email>julian.reschke@greenbytes.de</email> |
---|
172 | <uri>http://greenbytes.de/tech/webdav/</uri> |
---|
173 | </address> |
---|
174 | </author> |
---|
175 | |
---|
176 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
177 | |
---|
178 | <abstract> |
---|
179 | <t> |
---|
180 | The Hypertext Transfer Protocol (HTTP) is an application-level |
---|
181 | protocol for distributed, collaborative, hypermedia information |
---|
182 | systems. HTTP has been in use by the World Wide Web global information |
---|
183 | initiative since 1990. This document is Part 4 of the seven-part specification |
---|
184 | that defines the protocol referred to as "HTTP/1.1" and, taken together, |
---|
185 | obsoletes RFC 2616. Part 4 defines request header fields for |
---|
186 | indicating conditional requests and the rules for constructing responses |
---|
187 | to those requests. |
---|
188 | </t> |
---|
189 | </abstract> |
---|
190 | |
---|
191 | <note title="Editorial Note (To be removed by RFC Editor)"> |
---|
192 | <t> |
---|
193 | Discussion of this draft should take place on the HTTPBIS working group |
---|
194 | mailing list (ietf-http-wg@w3.org). The current issues list is |
---|
195 | at <eref target="http://www.tools.ietf.org/wg/httpbis/trac/report/11"/> |
---|
196 | and related documents (including fancy diffs) can be found at |
---|
197 | <eref target="http://www.tools.ietf.org/wg/httpbis/"/>. |
---|
198 | </t> |
---|
199 | </note> |
---|
200 | </front> |
---|
201 | <middle> |
---|
202 | <section title="Introduction" anchor="introduction"> |
---|
203 | <t> |
---|
204 | This document will define aspects of HTTP related to conditional |
---|
205 | request messages based on time stamps and entity-tags. Right now it |
---|
206 | only includes the extracted relevant sections of <xref target="RFC2616">RFC 2616</xref> |
---|
207 | without edit. |
---|
208 | </t> |
---|
209 | |
---|
210 | <section title="Requirements" anchor="intro.requirements"> |
---|
211 | <t> |
---|
212 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
---|
213 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
---|
214 | document are to be interpreted as described in <xref target="RFC2119"/>. |
---|
215 | </t> |
---|
216 | <t> |
---|
217 | An implementation is not compliant if it fails to satisfy one or more |
---|
218 | of the &MUST; or &REQUIRED; level requirements for the protocols it |
---|
219 | implements. An implementation that satisfies all the &MUST; or &REQUIRED; |
---|
220 | level and all the &SHOULD; level requirements for its protocols is said |
---|
221 | to be "unconditionally compliant"; one that satisfies all the &MUST; |
---|
222 | level requirements but not all the &SHOULD; level requirements for its |
---|
223 | protocols is said to be "conditionally compliant." |
---|
224 | </t> |
---|
225 | </section> |
---|
226 | </section> |
---|
227 | |
---|
228 | <section title="Entity Tags" anchor="entity.tags"> |
---|
229 | <t> |
---|
230 | Entity tags are used for comparing two or more entities from the same |
---|
231 | requested resource. HTTP/1.1 uses entity tags in the ETag (<xref target="header.etag"/>), |
---|
232 | If-Match (<xref target="header.if-match"/>), If-None-Match (<xref target="header.if-none-match"/>), and |
---|
233 | If-Range (&header-if-range;) header fields. The definition of how they |
---|
234 | are used and compared as cache validators is in <xref target="weak.and.strong.validators"/>. An |
---|
235 | entity tag consists of an opaque quoted string, possibly prefixed by |
---|
236 | a weakness indicator. |
---|
237 | </t> |
---|
238 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-tag"/><iref primary="true" item="Grammar" subitem="weak"/><iref primary="true" item="Grammar" subitem="opaque-tag"/> |
---|
239 | entity-tag = [ weak ] opaque-tag |
---|
240 | weak = "W/" |
---|
241 | opaque-tag = quoted-string |
---|
242 | </artwork></figure> |
---|
243 | <t> |
---|
244 | A "strong entity tag" &MAY; be shared by two entities of a resource |
---|
245 | only if they are equivalent by octet equality. |
---|
246 | </t> |
---|
247 | <t> |
---|
248 | A "weak entity tag," indicated by the "W/" prefix, &MAY; be shared by |
---|
249 | two entities of a resource only if the entities are equivalent and |
---|
250 | could be substituted for each other with no significant change in |
---|
251 | semantics. A weak entity tag can only be used for weak comparison. |
---|
252 | </t> |
---|
253 | <t> |
---|
254 | An entity tag &MUST; be unique across all versions of all entities |
---|
255 | associated with a particular resource. A given entity tag value &MAY; |
---|
256 | be used for entities obtained by requests on different URIs. The use |
---|
257 | of the same entity tag value in conjunction with entities obtained by |
---|
258 | requests on different URIs does not imply the equivalence of those |
---|
259 | entities. |
---|
260 | </t> |
---|
261 | </section> |
---|
262 | |
---|
263 | <section title="Status Code Definitions"> |
---|
264 | <section title="304 Not Modified" anchor="status.304"> |
---|
265 | <iref primary="true" item="304 Not Modified (status code)" x:for-anchor=""/> |
---|
266 | <iref primary="true" item="Status Codes" subitem="304 Not Modified" x:for-anchor=""/> |
---|
267 | <t> |
---|
268 | If the client has performed a conditional GET request and access is |
---|
269 | allowed, but the document has not been modified, the server &SHOULD; |
---|
270 | respond with this status code. The 304 response &MUST-NOT; contain a |
---|
271 | message-body, and thus is always terminated by the first empty line |
---|
272 | after the header fields. |
---|
273 | </t> |
---|
274 | <t> |
---|
275 | The response &MUST; include the following header fields: |
---|
276 | <list style="symbols"> |
---|
277 | <t>Date, unless its omission is required by &clockless;</t> |
---|
278 | </list> |
---|
279 | </t> |
---|
280 | <t> |
---|
281 | If a clockless origin server obeys these rules, and proxies and |
---|
282 | clients add their own Date to any response received without one (as |
---|
283 | already specified by <xref target="RFC2068" x:sec="14.19" x:fmt=","/>), caches will operate |
---|
284 | correctly. |
---|
285 | <list style="symbols"> |
---|
286 | <t>ETag and/or Content-Location, if the header would have been sent |
---|
287 | in a 200 response to the same request</t> |
---|
288 | <t>Expires, Cache-Control, and/or Vary, if the field-value might |
---|
289 | differ from that sent in any previous response for the same |
---|
290 | variant</t> |
---|
291 | </list> |
---|
292 | </t> |
---|
293 | <t> |
---|
294 | If the conditional GET used a strong cache validator (see <xref target="weak.and.strong.validators"/>), |
---|
295 | the response &SHOULD-NOT; include other entity-headers. |
---|
296 | Otherwise (i.e., the conditional GET used a weak validator), the |
---|
297 | response &MUST-NOT; include other entity-headers; this prevents |
---|
298 | inconsistencies between cached entity-bodies and updated headers. |
---|
299 | </t> |
---|
300 | <t> |
---|
301 | If a 304 response indicates an entity not currently cached, then the |
---|
302 | cache &MUST; disregard the response and repeat the request without the |
---|
303 | conditional. |
---|
304 | </t> |
---|
305 | <t> |
---|
306 | If a cache uses a received 304 response to update a cache entry, the |
---|
307 | cache &MUST; update the entry to reflect any new field values given in |
---|
308 | the response. |
---|
309 | </t> |
---|
310 | </section> |
---|
311 | |
---|
312 | <section title="412 Precondition Failed" anchor="status.412"> |
---|
313 | <iref primary="true" item="412 Precondition Failed (status code)" x:for-anchor=""/> |
---|
314 | <iref primary="true" item="Status Codes" subitem="412 Precondition Failed" x:for-anchor=""/> |
---|
315 | <t> |
---|
316 | The precondition given in one or more of the request-header fields |
---|
317 | evaluated to false when it was tested on the server. This response |
---|
318 | code allows the client to place preconditions on the current resource |
---|
319 | metainformation (header field data) and thus prevent the requested |
---|
320 | method from being applied to a resource other than the one intended. |
---|
321 | </t> |
---|
322 | </section> |
---|
323 | </section> |
---|
324 | |
---|
325 | <section title="Weak and Strong Validators" anchor="weak.and.strong.validators"> |
---|
326 | <t> |
---|
327 | Since both origin servers and caches will compare two validators to |
---|
328 | decide if they represent the same or different entities, one normally |
---|
329 | would expect that if the entity (the entity-body or any entity-headers) |
---|
330 | changes in any way, then the associated validator would |
---|
331 | change as well. If this is true, then we call this validator a |
---|
332 | "strong validator." |
---|
333 | </t> |
---|
334 | <t> |
---|
335 | However, there might be cases when a server prefers to change the |
---|
336 | validator only on semantically significant changes, and not when |
---|
337 | insignificant aspects of the entity change. A validator that does not |
---|
338 | always change when the resource changes is a "weak validator." |
---|
339 | </t> |
---|
340 | <t> |
---|
341 | Entity tags are normally "strong validators," but the protocol |
---|
342 | provides a mechanism to tag an entity tag as "weak." One can think of |
---|
343 | a strong validator as one that changes whenever the bits of an entity |
---|
344 | changes, while a weak value changes whenever the meaning of an entity |
---|
345 | changes. Alternatively, one can think of a strong validator as part |
---|
346 | of an identifier for a specific entity, while a weak validator is |
---|
347 | part of an identifier for a set of semantically equivalent entities. |
---|
348 | <list><t> |
---|
349 | <x:h>Note:</x:h> One example of a strong validator is an integer that is |
---|
350 | incremented in stable storage every time an entity is changed. |
---|
351 | </t><t> |
---|
352 | An entity's modification time, if represented with one-second |
---|
353 | resolution, could be a weak validator, since it is possible that |
---|
354 | the resource might be modified twice during a single second. |
---|
355 | </t><t> |
---|
356 | Support for weak validators is optional. However, weak validators |
---|
357 | allow for more efficient caching of equivalent objects; for |
---|
358 | example, a hit counter on a site is probably good enough if it is |
---|
359 | updated every few days or weeks, and any value during that period |
---|
360 | is likely "good enough" to be equivalent. |
---|
361 | </t></list> |
---|
362 | </t> |
---|
363 | <t> |
---|
364 | A "use" of a validator is either when a client generates a request |
---|
365 | and includes the validator in a validating header field, or when a |
---|
366 | server compares two validators. |
---|
367 | </t> |
---|
368 | <t> |
---|
369 | Strong validators are usable in any context. Weak validators are only |
---|
370 | usable in contexts that do not depend on exact equality of an entity. |
---|
371 | For example, either kind is usable for a conditional GET of a full |
---|
372 | entity. However, only a strong validator is usable for a sub-range |
---|
373 | retrieval, since otherwise the client might end up with an internally |
---|
374 | inconsistent entity. |
---|
375 | </t> |
---|
376 | <t> |
---|
377 | Clients &MAY; issue simple (non-subrange) GET requests with either weak |
---|
378 | validators or strong validators. Clients &MUST-NOT; use weak validators |
---|
379 | in other forms of request. |
---|
380 | </t> |
---|
381 | <t> |
---|
382 | The only function that the HTTP/1.1 protocol defines on validators is |
---|
383 | comparison. There are two validator comparison functions, depending |
---|
384 | on whether the comparison context allows the use of weak validators |
---|
385 | or not: |
---|
386 | <list style="symbols"> |
---|
387 | <t>The strong comparison function: in order to be considered equal, |
---|
388 | both validators &MUST; be identical in every way, and both &MUST-NOT; |
---|
389 | be weak.</t> |
---|
390 | <t>The weak comparison function: in order to be considered equal, |
---|
391 | both validators &MUST; be identical in every way, but either or |
---|
392 | both of them &MAY; be tagged as "weak" without affecting the |
---|
393 | result.</t> |
---|
394 | </list> |
---|
395 | </t> |
---|
396 | <t> |
---|
397 | An entity tag is strong unless it is explicitly tagged as weak. |
---|
398 | <xref target="entity.tags"/> gives the syntax for entity tags. |
---|
399 | </t> |
---|
400 | <t> |
---|
401 | A Last-Modified time, when used as a validator in a request, is |
---|
402 | implicitly weak unless it is possible to deduce that it is strong, |
---|
403 | using the following rules: |
---|
404 | <list style="symbols"> |
---|
405 | <t>The validator is being compared by an origin server to the |
---|
406 | actual current validator for the entity and,</t> |
---|
407 | <t>That origin server reliably knows that the associated entity did |
---|
408 | not change twice during the second covered by the presented |
---|
409 | validator.</t> |
---|
410 | </list> |
---|
411 | </t> |
---|
412 | <t> |
---|
413 | or |
---|
414 | <list style="symbols"> |
---|
415 | <t>The validator is about to be used by a client in an If-Modified-Since |
---|
416 | or If-Unmodified-Since header, because the client |
---|
417 | has a cache entry for the associated entity, and</t> |
---|
418 | <t>That cache entry includes a Date value, which gives the time |
---|
419 | when the origin server sent the original response, and</t> |
---|
420 | <t>The presented Last-Modified time is at least 60 seconds before |
---|
421 | the Date value.</t> |
---|
422 | </list> |
---|
423 | </t> |
---|
424 | <t> |
---|
425 | or |
---|
426 | <list style="symbols"> |
---|
427 | <t>The validator is being compared by an intermediate cache to the |
---|
428 | validator stored in its cache entry for the entity, and</t> |
---|
429 | <t>That cache entry includes a Date value, which gives the time |
---|
430 | when the origin server sent the original response, and</t> |
---|
431 | <t>The presented Last-Modified time is at least 60 seconds before |
---|
432 | the Date value.</t> |
---|
433 | </list> |
---|
434 | </t> |
---|
435 | <t> |
---|
436 | This method relies on the fact that if two different responses were |
---|
437 | sent by the origin server during the same second, but both had the |
---|
438 | same Last-Modified time, then at least one of those responses would |
---|
439 | have a Date value equal to its Last-Modified time. The arbitrary 60-second |
---|
440 | limit guards against the possibility that the Date and Last-Modified |
---|
441 | values are generated from different clocks, or at somewhat |
---|
442 | different times during the preparation of the response. An |
---|
443 | implementation &MAY; use a value larger than 60 seconds, if it is |
---|
444 | believed that 60 seconds is too short. |
---|
445 | </t> |
---|
446 | <t> |
---|
447 | If a client wishes to perform a sub-range retrieval on a value for |
---|
448 | which it has only a Last-Modified time and no opaque validator, it |
---|
449 | &MAY; do this only if the Last-Modified time is strong in the sense |
---|
450 | described here. |
---|
451 | </t> |
---|
452 | <t> |
---|
453 | A cache or origin server receiving a conditional request, other than |
---|
454 | a full-body GET request, &MUST; use the strong comparison function to |
---|
455 | evaluate the condition. |
---|
456 | </t> |
---|
457 | <t> |
---|
458 | These rules allow HTTP/1.1 caches and clients to safely perform sub-range |
---|
459 | retrievals on values that have been obtained from HTTP/1.0 |
---|
460 | servers. |
---|
461 | </t> |
---|
462 | </section> |
---|
463 | |
---|
464 | <section title="Rules for When to Use Entity Tags and Last-Modified Dates" anchor="rules.for.when.to.use.entity.tags.and.last-modified.dates"> |
---|
465 | <t> |
---|
466 | We adopt a set of rules and recommendations for origin servers, |
---|
467 | clients, and caches regarding when various validator types ought to |
---|
468 | be used, and for what purposes. |
---|
469 | </t> |
---|
470 | <t> |
---|
471 | HTTP/1.1 origin servers: |
---|
472 | <list style="symbols"> |
---|
473 | <t>&SHOULD; send an entity tag validator unless it is not feasible to |
---|
474 | generate one.</t> |
---|
475 | |
---|
476 | <t>&MAY; send a weak entity tag instead of a strong entity tag, if |
---|
477 | performance considerations support the use of weak entity tags, |
---|
478 | or if it is unfeasible to send a strong entity tag.</t> |
---|
479 | |
---|
480 | <t>&SHOULD; send a Last-Modified value if it is feasible to send one, |
---|
481 | unless the risk of a breakdown in semantic transparency that |
---|
482 | could result from using this date in an If-Modified-Since header |
---|
483 | would lead to serious problems.</t> |
---|
484 | </list> |
---|
485 | </t> |
---|
486 | <t> |
---|
487 | In other words, the preferred behavior for an HTTP/1.1 origin server |
---|
488 | is to send both a strong entity tag and a Last-Modified value. |
---|
489 | </t> |
---|
490 | <t> |
---|
491 | In order to be legal, a strong entity tag &MUST; change whenever the |
---|
492 | associated entity value changes in any way. A weak entity tag &SHOULD; |
---|
493 | change whenever the associated entity changes in a semantically |
---|
494 | significant way. |
---|
495 | <list><t> |
---|
496 | <x:h>Note:</x:h> in order to provide semantically transparent caching, an |
---|
497 | origin server must avoid reusing a specific strong entity tag |
---|
498 | value for two different entities, or reusing a specific weak |
---|
499 | entity tag value for two semantically different entities. Cache |
---|
500 | entries might persist for arbitrarily long periods, regardless of |
---|
501 | expiration times, so it might be inappropriate to expect that a |
---|
502 | cache will never again attempt to validate an entry using a |
---|
503 | validator that it obtained at some point in the past. |
---|
504 | </t></list> |
---|
505 | </t> |
---|
506 | <t> |
---|
507 | HTTP/1.1 clients: |
---|
508 | <list style="symbols"> |
---|
509 | <t>If an entity tag has been provided by the origin server, &MUST; |
---|
510 | use that entity tag in any cache-conditional request (using If-Match |
---|
511 | or If-None-Match).</t> |
---|
512 | |
---|
513 | <t>If only a Last-Modified value has been provided by the origin |
---|
514 | server, &SHOULD; use that value in non-subrange cache-conditional |
---|
515 | requests (using If-Modified-Since).</t> |
---|
516 | |
---|
517 | <t>If only a Last-Modified value has been provided by an HTTP/1.0 |
---|
518 | origin server, &MAY; use that value in subrange cache-conditional |
---|
519 | requests (using If-Unmodified-Since:). The user agent &SHOULD; |
---|
520 | provide a way to disable this, in case of difficulty.</t> |
---|
521 | |
---|
522 | <t>If both an entity tag and a Last-Modified value have been |
---|
523 | provided by the origin server, &SHOULD; use both validators in |
---|
524 | cache-conditional requests. This allows both HTTP/1.0 and |
---|
525 | HTTP/1.1 caches to respond appropriately.</t> |
---|
526 | </list> |
---|
527 | </t> |
---|
528 | <t> |
---|
529 | An HTTP/1.1 origin server, upon receiving a conditional request that |
---|
530 | includes both a Last-Modified date (e.g., in an If-Modified-Since or |
---|
531 | If-Unmodified-Since header field) and one or more entity tags (e.g., |
---|
532 | in an If-Match, If-None-Match, or If-Range header field) as cache |
---|
533 | validators, &MUST-NOT; return a response status of 304 (Not Modified) |
---|
534 | unless doing so is consistent with all of the conditional header |
---|
535 | fields in the request. |
---|
536 | </t> |
---|
537 | <t> |
---|
538 | An HTTP/1.1 caching proxy, upon receiving a conditional request that |
---|
539 | includes both a Last-Modified date and one or more entity tags as |
---|
540 | cache validators, &MUST-NOT; return a locally cached response to the |
---|
541 | client unless that cached response is consistent with all of the |
---|
542 | conditional header fields in the request. |
---|
543 | <list><t> |
---|
544 | <x:h>Note:</x:h> The general principle behind these rules is that HTTP/1.1 |
---|
545 | servers and clients should transmit as much non-redundant |
---|
546 | information as is available in their responses and requests. |
---|
547 | HTTP/1.1 systems receiving this information will make the most |
---|
548 | conservative assumptions about the validators they receive. |
---|
549 | </t><t> |
---|
550 | HTTP/1.0 clients and caches will ignore entity tags. Generally, |
---|
551 | last-modified values received or used by these systems will |
---|
552 | support transparent and efficient caching, and so HTTP/1.1 origin |
---|
553 | servers should provide Last-Modified values. In those rare cases |
---|
554 | where the use of a Last-Modified value as a validator by an |
---|
555 | HTTP/1.0 system could result in a serious problem, then HTTP/1.1 |
---|
556 | origin servers should not provide one. |
---|
557 | </t></list> |
---|
558 | </t> |
---|
559 | </section> |
---|
560 | |
---|
561 | <section title="Header Field Definitions" anchor="header.fields"> |
---|
562 | <t> |
---|
563 | This section defines the syntax and semantics of HTTP/1.1 header fields |
---|
564 | related to conditional requests. |
---|
565 | </t> |
---|
566 | <t> |
---|
567 | For entity-header fields, both sender and recipient refer to either the |
---|
568 | client or the server, depending on who sends and who receives the entity. |
---|
569 | </t> |
---|
570 | |
---|
571 | <section title="ETag" anchor="header.etag"> |
---|
572 | <iref primary="true" item="ETag header" x:for-anchor=""/> |
---|
573 | <iref primary="true" item="Headers" subitem="ETag" x:for-anchor=""/> |
---|
574 | <t> |
---|
575 | The ETag response-header field provides the current value of the |
---|
576 | entity tag for the requested variant. The headers used with entity |
---|
577 | tags are described in Sections <xref target="header.if-match" format="counter"/> |
---|
578 | and <xref target="header.if-none-match" format="counter"/> of this document, |
---|
579 | and in &header-if-range;. The entity tag |
---|
580 | &MAY; be used for comparison with other entities from the same resource |
---|
581 | (see <xref target="weak.and.strong.validators"/>). |
---|
582 | </t> |
---|
583 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ETag"/> |
---|
584 | ETag = "ETag" ":" entity-tag |
---|
585 | </artwork></figure> |
---|
586 | <figure><preamble> |
---|
587 | Examples: |
---|
588 | </preamble> |
---|
589 | <artwork type="example"> |
---|
590 | ETag: "xyzzy" |
---|
591 | ETag: W/"xyzzy" |
---|
592 | ETag: "" |
---|
593 | </artwork></figure> |
---|
594 | </section> |
---|
595 | |
---|
596 | <section title="If-Match" anchor="header.if-match"> |
---|
597 | <iref primary="true" item="If-Match header" x:for-anchor=""/> |
---|
598 | <iref primary="true" item="Headers" subitem="If-Match" x:for-anchor=""/> |
---|
599 | <t> |
---|
600 | The If-Match request-header field is used with a method to make it |
---|
601 | conditional. A client that has one or more entities previously |
---|
602 | obtained from the resource can verify that one of those entities is |
---|
603 | current by including a list of their associated entity tags in the |
---|
604 | If-Match header field. Entity tags are defined in <xref target="entity.tags"/>. The |
---|
605 | purpose of this feature is to allow efficient updates of cached |
---|
606 | information with a minimum amount of transaction overhead. It is also |
---|
607 | used, on updating requests, to prevent inadvertent modification of |
---|
608 | the wrong version of a resource. As a special case, the value "*" |
---|
609 | matches any current entity of the resource. |
---|
610 | </t> |
---|
611 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Match"/> |
---|
612 | If-Match = "If-Match" ":" ( "*" | 1#entity-tag ) |
---|
613 | </artwork></figure> |
---|
614 | <t> |
---|
615 | If any of the entity tags match the entity tag of the entity that |
---|
616 | would have been returned in the response to a similar GET request |
---|
617 | (without the If-Match header) on that resource, or if "*" is given |
---|
618 | and any current entity exists for that resource, then the server &MAY; |
---|
619 | perform the requested method as if the If-Match header field did not |
---|
620 | exist. |
---|
621 | </t> |
---|
622 | <t> |
---|
623 | A server &MUST; use the strong comparison function (see <xref target="weak.and.strong.validators"/>) |
---|
624 | to compare the entity tags in If-Match. |
---|
625 | </t> |
---|
626 | <t> |
---|
627 | If none of the entity tags match, or if "*" is given and no current |
---|
628 | entity exists, the server &MUST-NOT; perform the requested method, and |
---|
629 | &MUST; return a 412 (Precondition Failed) response. This behavior is |
---|
630 | most useful when the client wants to prevent an updating method, such |
---|
631 | as PUT, from modifying a resource that has changed since the client |
---|
632 | last retrieved it. |
---|
633 | </t> |
---|
634 | <t> |
---|
635 | If the request would, without the If-Match header field, result in |
---|
636 | anything other than a 2xx or 412 status, then the If-Match header |
---|
637 | &MUST; be ignored. |
---|
638 | </t> |
---|
639 | <t> |
---|
640 | The meaning of "If-Match: *" is that the method &SHOULD; be performed |
---|
641 | if the representation selected by the origin server (or by a cache, |
---|
642 | possibly using the Vary mechanism, see &header-vary;) exists, and |
---|
643 | &MUST-NOT; be performed if the representation does not exist. |
---|
644 | </t> |
---|
645 | <t> |
---|
646 | A request intended to update a resource (e.g., a PUT) &MAY; include an |
---|
647 | If-Match header field to signal that the request method &MUST-NOT; be |
---|
648 | applied if the entity corresponding to the If-Match value (a single |
---|
649 | entity tag) is no longer a representation of that resource. This |
---|
650 | allows the user to indicate that they do not wish the request to be |
---|
651 | successful if the resource has been changed without their knowledge. |
---|
652 | Examples: |
---|
653 | </t> |
---|
654 | <figure><artwork type="example"> |
---|
655 | If-Match: "xyzzy" |
---|
656 | If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" |
---|
657 | If-Match: * |
---|
658 | </artwork></figure> |
---|
659 | <t> |
---|
660 | The result of a request having both an If-Match header field and |
---|
661 | either an If-None-Match or an If-Modified-Since header fields is |
---|
662 | undefined by this specification. |
---|
663 | </t> |
---|
664 | </section> |
---|
665 | |
---|
666 | <section title="If-Modified-Since" anchor="header.if-modified-since"> |
---|
667 | <iref primary="true" item="If-Modified-Since header" x:for-anchor=""/> |
---|
668 | <iref primary="true" item="Headers" subitem="If-Modified-Since" x:for-anchor=""/> |
---|
669 | <t> |
---|
670 | The If-Modified-Since request-header field is used with a method to |
---|
671 | make it conditional: if the requested variant has not been modified |
---|
672 | since the time specified in this field, an entity will not be |
---|
673 | returned from the server; instead, a 304 (Not Modified) response will |
---|
674 | be returned without any message-body. |
---|
675 | </t> |
---|
676 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/> |
---|
677 | If-Modified-Since = "If-Modified-Since" ":" HTTP-date |
---|
678 | </artwork></figure> |
---|
679 | <t> |
---|
680 | An example of the field is: |
---|
681 | </t> |
---|
682 | <figure><artwork type="example"> |
---|
683 | If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT |
---|
684 | </artwork></figure> |
---|
685 | <t> |
---|
686 | A GET method with an If-Modified-Since header and no Range header |
---|
687 | requests that the identified entity be transferred only if it has |
---|
688 | been modified since the date given by the If-Modified-Since header. |
---|
689 | The algorithm for determining this includes the following cases: |
---|
690 | <list style="numbers"> |
---|
691 | <t>If the request would normally result in anything other than a |
---|
692 | 200 (OK) status, or if the passed If-Modified-Since date is |
---|
693 | invalid, the response is exactly the same as for a normal GET. |
---|
694 | A date which is later than the server's current time is |
---|
695 | invalid.</t> |
---|
696 | |
---|
697 | <t>If the variant has been modified since the If-Modified-Since |
---|
698 | date, the response is exactly the same as for a normal GET.</t> |
---|
699 | |
---|
700 | <t>If the variant has not been modified since a valid If-Modified-Since |
---|
701 | date, the server &SHOULD; return a 304 (Not |
---|
702 | Modified) response.</t> |
---|
703 | </list> |
---|
704 | </t> |
---|
705 | <t> |
---|
706 | The purpose of this feature is to allow efficient updates of cached |
---|
707 | information with a minimum amount of transaction overhead. |
---|
708 | <list><t> |
---|
709 | <x:h>Note:</x:h> The Range request-header field modifies the meaning of If-Modified-Since; |
---|
710 | see &header-range; for full details. |
---|
711 | </t><t> |
---|
712 | <x:h>Note:</x:h> If-Modified-Since times are interpreted by the server, whose |
---|
713 | clock might not be synchronized with the client. |
---|
714 | </t><t> |
---|
715 | <x:h>Note:</x:h> When handling an If-Modified-Since header field, some |
---|
716 | servers will use an exact date comparison function, rather than a |
---|
717 | less-than function, for deciding whether to send a 304 (Not |
---|
718 | Modified) response. To get best results when sending an If-Modified-Since |
---|
719 | header field for cache validation, clients are |
---|
720 | advised to use the exact date string received in a previous Last-Modified |
---|
721 | header field whenever possible. |
---|
722 | </t><t> |
---|
723 | <x:h>Note:</x:h> If a client uses an arbitrary date in the If-Modified-Since |
---|
724 | header instead of a date taken from the Last-Modified header for |
---|
725 | the same request, the client should be aware of the fact that this |
---|
726 | date is interpreted in the server's understanding of time. The |
---|
727 | client should consider unsynchronized clocks and rounding problems |
---|
728 | due to the different encodings of time between the client and |
---|
729 | server. This includes the possibility of race conditions if the |
---|
730 | document has changed between the time it was first requested and |
---|
731 | the If-Modified-Since date of a subsequent request, and the |
---|
732 | possibility of clock-skew-related problems if the If-Modified-Since |
---|
733 | date is derived from the client's clock without correction |
---|
734 | to the server's clock. Corrections for different time bases |
---|
735 | between client and server are at best approximate due to network |
---|
736 | latency. |
---|
737 | </t> |
---|
738 | </list> |
---|
739 | </t> |
---|
740 | <t> |
---|
741 | The result of a request having both an If-Modified-Since header field |
---|
742 | and either an If-Match or an If-Unmodified-Since header fields is |
---|
743 | undefined by this specification. |
---|
744 | </t> |
---|
745 | </section> |
---|
746 | |
---|
747 | <section title="If-None-Match" anchor="header.if-none-match"> |
---|
748 | <iref primary="true" item="If-None-Match header" x:for-anchor=""/> |
---|
749 | <iref primary="true" item="Headers" subitem="If-None-Match" x:for-anchor=""/> |
---|
750 | <t> |
---|
751 | The If-None-Match request-header field is used with a method to make |
---|
752 | it conditional. A client that has one or more entities previously |
---|
753 | obtained from the resource can verify that none of those entities is |
---|
754 | current by including a list of their associated entity tags in the |
---|
755 | If-None-Match header field. The purpose of this feature is to allow |
---|
756 | efficient updates of cached information with a minimum amount of |
---|
757 | transaction overhead. It is also used to prevent a method (e.g. PUT) |
---|
758 | from inadvertently modifying an existing resource when the client |
---|
759 | believes that the resource does not exist. |
---|
760 | </t> |
---|
761 | <t> |
---|
762 | As a special case, the value "*" matches any current entity of the |
---|
763 | resource. |
---|
764 | </t> |
---|
765 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-None-Match"/> |
---|
766 | If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag ) |
---|
767 | </artwork></figure> |
---|
768 | <t> |
---|
769 | If any of the entity tags match the entity tag of the entity that |
---|
770 | would have been returned in the response to a similar GET request |
---|
771 | (without the If-None-Match header) on that resource, or if "*" is |
---|
772 | given and any current entity exists for that resource, then the |
---|
773 | server &MUST-NOT; perform the requested method, unless required to do |
---|
774 | so because the resource's modification date fails to match that |
---|
775 | supplied in an If-Modified-Since header field in the request. |
---|
776 | Instead, if the request method was GET or HEAD, the server &SHOULD; |
---|
777 | respond with a 304 (Not Modified) response, including the cache-related |
---|
778 | header fields (particularly ETag) of one of the entities that |
---|
779 | matched. For all other request methods, the server &MUST; respond with |
---|
780 | a status of 412 (Precondition Failed). |
---|
781 | </t> |
---|
782 | <t> |
---|
783 | See <xref target="weak.and.strong.validators"/> for rules on how to determine if two entities tags |
---|
784 | match. The weak comparison function can only be used with GET or HEAD |
---|
785 | requests. |
---|
786 | </t> |
---|
787 | <t> |
---|
788 | If none of the entity tags match, then the server &MAY; perform the |
---|
789 | requested method as if the If-None-Match header field did not exist, |
---|
790 | but &MUST; also ignore any If-Modified-Since header field(s) in the |
---|
791 | request. That is, if no entity tags match, then the server &MUST-NOT; |
---|
792 | return a 304 (Not Modified) response. |
---|
793 | </t> |
---|
794 | <t> |
---|
795 | If the request would, without the If-None-Match header field, result |
---|
796 | in anything other than a 2xx or 304 status, then the If-None-Match |
---|
797 | header &MUST; be ignored. (See <xref target="rules.for.when.to.use.entity.tags.and.last-modified.dates"/> for a discussion of |
---|
798 | server behavior when both If-Modified-Since and If-None-Match appear |
---|
799 | in the same request.) |
---|
800 | </t> |
---|
801 | <t> |
---|
802 | The meaning of "If-None-Match: *" is that the method &MUST-NOT; be |
---|
803 | performed if the representation selected by the origin server (or by |
---|
804 | a cache, possibly using the Vary mechanism, see &header-vary;) |
---|
805 | exists, and &SHOULD; be performed if the representation does not exist. |
---|
806 | This feature is intended to be useful in preventing races between PUT |
---|
807 | operations. |
---|
808 | </t> |
---|
809 | <t> |
---|
810 | Examples: |
---|
811 | </t> |
---|
812 | <figure><artwork type="example"> |
---|
813 | If-None-Match: "xyzzy" |
---|
814 | If-None-Match: W/"xyzzy" |
---|
815 | If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" |
---|
816 | If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz" |
---|
817 | If-None-Match: * |
---|
818 | </artwork></figure> |
---|
819 | <t> |
---|
820 | The result of a request having both an If-None-Match header field and |
---|
821 | either an If-Match or an If-Unmodified-Since header fields is |
---|
822 | undefined by this specification. |
---|
823 | </t> |
---|
824 | </section> |
---|
825 | |
---|
826 | <section title="If-Unmodified-Since" anchor="header.if-unmodified-since"> |
---|
827 | <iref primary="true" item="If-Unmodified-Since header" x:for-anchor=""/> |
---|
828 | <iref primary="true" item="Headers" subitem="If-Unmodified-Since" x:for-anchor=""/> |
---|
829 | <t> |
---|
830 | The If-Unmodified-Since request-header field is used with a method to |
---|
831 | make it conditional. If the requested resource has not been modified |
---|
832 | since the time specified in this field, the server &SHOULD; perform the |
---|
833 | requested operation as if the If-Unmodified-Since header were not |
---|
834 | present. |
---|
835 | </t> |
---|
836 | <t> |
---|
837 | If the requested variant has been modified since the specified time, |
---|
838 | the server &MUST-NOT; perform the requested operation, and &MUST; return |
---|
839 | a 412 (Precondition Failed). |
---|
840 | </t> |
---|
841 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/> |
---|
842 | If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date |
---|
843 | </artwork></figure> |
---|
844 | <t> |
---|
845 | An example of the field is: |
---|
846 | </t> |
---|
847 | <figure><artwork type="example"> |
---|
848 | If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT |
---|
849 | </artwork></figure> |
---|
850 | <t> |
---|
851 | If the request normally (i.e., without the If-Unmodified-Since |
---|
852 | header) would result in anything other than a 2xx or 412 status, the |
---|
853 | If-Unmodified-Since header &SHOULD; be ignored. |
---|
854 | </t> |
---|
855 | <t> |
---|
856 | If the specified date is invalid, the header is ignored. |
---|
857 | </t> |
---|
858 | <t> |
---|
859 | The result of a request having both an If-Unmodified-Since header |
---|
860 | field and either an If-None-Match or an If-Modified-Since header |
---|
861 | fields is undefined by this specification. |
---|
862 | </t> |
---|
863 | </section> |
---|
864 | |
---|
865 | <section title="Last-Modified" anchor="header.last-modified"> |
---|
866 | <iref primary="true" item="Last-Modified header" x:for-anchor=""/> |
---|
867 | <iref primary="true" item="Headers" subitem="Last-Modified" x:for-anchor=""/> |
---|
868 | <t> |
---|
869 | The Last-Modified entity-header field indicates the date and time at |
---|
870 | which the origin server believes the variant was last modified. |
---|
871 | </t> |
---|
872 | <figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Last-Modified"/> |
---|
873 | Last-Modified = "Last-Modified" ":" HTTP-date |
---|
874 | </artwork></figure> |
---|
875 | <t> |
---|
876 | An example of its use is |
---|
877 | </t> |
---|
878 | <figure><artwork type="example"> |
---|
879 | Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT |
---|
880 | </artwork></figure> |
---|
881 | <t> |
---|
882 | The exact meaning of this header field depends on the implementation |
---|
883 | of the origin server and the nature of the original resource. For |
---|
884 | files, it may be just the file system last-modified time. For |
---|
885 | entities with dynamically included parts, it may be the most recent |
---|
886 | of the set of last-modify times for its component parts. For database |
---|
887 | gateways, it may be the last-update time stamp of the record. For |
---|
888 | virtual objects, it may be the last time the internal state changed. |
---|
889 | </t> |
---|
890 | <t> |
---|
891 | An origin server &MUST-NOT; send a Last-Modified date which is later |
---|
892 | than the server's time of message origination. In such cases, where |
---|
893 | the resource's last modification would indicate some time in the |
---|
894 | future, the server &MUST; replace that date with the message |
---|
895 | origination date. |
---|
896 | </t> |
---|
897 | <t> |
---|
898 | An origin server &SHOULD; obtain the Last-Modified value of the entity |
---|
899 | as close as possible to the time that it generates the Date value of |
---|
900 | its response. This allows a recipient to make an accurate assessment |
---|
901 | of the entity's modification time, especially if the entity changes |
---|
902 | near the time that the response is generated. |
---|
903 | </t> |
---|
904 | <t> |
---|
905 | HTTP/1.1 servers &SHOULD; send Last-Modified whenever feasible. |
---|
906 | </t> |
---|
907 | </section> |
---|
908 | |
---|
909 | </section> |
---|
910 | |
---|
911 | <section title="IANA Considerations" anchor="IANA.considerations"> |
---|
912 | <t> |
---|
913 | TBD. |
---|
914 | </t> |
---|
915 | </section> |
---|
916 | |
---|
917 | <section title="Security Considerations" anchor="security.considerations"> |
---|
918 | <t> |
---|
919 | No additional security considerations have been identified beyond |
---|
920 | those applicable to HTTP in general &messaging;. |
---|
921 | </t> |
---|
922 | </section> |
---|
923 | |
---|
924 | <section title="Acknowledgments" anchor="ack"> |
---|
925 | </section> |
---|
926 | </middle> |
---|
927 | <back> |
---|
928 | |
---|
929 | <references title="Normative References"> |
---|
930 | |
---|
931 | <reference anchor="Part1"> |
---|
932 | <front> |
---|
933 | <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title> |
---|
934 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
935 | <organization abbrev="Day Software">Day Software</organization> |
---|
936 | <address><email>fielding@gbiv.com</email></address> |
---|
937 | </author> |
---|
938 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
939 | <organization>One Laptop per Child</organization> |
---|
940 | <address><email>jg@laptop.org</email></address> |
---|
941 | </author> |
---|
942 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
943 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
944 | <address><email>JeffMogul@acm.org</email></address> |
---|
945 | </author> |
---|
946 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
947 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
948 | <address><email>henrikn@microsoft.com</email></address> |
---|
949 | </author> |
---|
950 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
951 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
952 | <address><email>LMM@acm.org</email></address> |
---|
953 | </author> |
---|
954 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
955 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
956 | <address><email>paulle@microsoft.com</email></address> |
---|
957 | </author> |
---|
958 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
959 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
960 | <address><email>timbl@w3.org</email></address> |
---|
961 | </author> |
---|
962 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
963 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
964 | <address><email>ylafon@w3.org</email></address> |
---|
965 | </author> |
---|
966 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
967 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
968 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
969 | </author> |
---|
970 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
971 | </front> |
---|
972 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/> |
---|
973 | <x:source href="p1-messaging.xml" basename="p1-messaging"/> |
---|
974 | </reference> |
---|
975 | |
---|
976 | <reference anchor="Part5"> |
---|
977 | <front> |
---|
978 | <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title> |
---|
979 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
980 | <organization abbrev="Day Software">Day Software</organization> |
---|
981 | <address><email>fielding@gbiv.com</email></address> |
---|
982 | </author> |
---|
983 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
984 | <organization>One Laptop per Child</organization> |
---|
985 | <address><email>jg@laptop.org</email></address> |
---|
986 | </author> |
---|
987 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
988 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
989 | <address><email>JeffMogul@acm.org</email></address> |
---|
990 | </author> |
---|
991 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
992 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
993 | <address><email>henrikn@microsoft.com</email></address> |
---|
994 | </author> |
---|
995 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
996 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
997 | <address><email>LMM@acm.org</email></address> |
---|
998 | </author> |
---|
999 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1000 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1001 | <address><email>paulle@microsoft.com</email></address> |
---|
1002 | </author> |
---|
1003 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1004 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1005 | <address><email>timbl@w3.org</email></address> |
---|
1006 | </author> |
---|
1007 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1008 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1009 | <address><email>ylafon@w3.org</email></address> |
---|
1010 | </author> |
---|
1011 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1012 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1013 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1014 | </author> |
---|
1015 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1016 | </front> |
---|
1017 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/> |
---|
1018 | <x:source href="p5-range.xml" basename="p5-range"/> |
---|
1019 | </reference> |
---|
1020 | |
---|
1021 | <reference anchor="Part6"> |
---|
1022 | <front> |
---|
1023 | <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title> |
---|
1024 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"> |
---|
1025 | <organization abbrev="Day Software">Day Software</organization> |
---|
1026 | <address><email>fielding@gbiv.com</email></address> |
---|
1027 | </author> |
---|
1028 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1029 | <organization>One Laptop per Child</organization> |
---|
1030 | <address><email>jg@laptop.org</email></address> |
---|
1031 | </author> |
---|
1032 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1033 | <organization abbrev="HP">Hewlett-Packard Company</organization> |
---|
1034 | <address><email>JeffMogul@acm.org</email></address> |
---|
1035 | </author> |
---|
1036 | <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen"> |
---|
1037 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1038 | <address><email>henrikn@microsoft.com</email></address> |
---|
1039 | </author> |
---|
1040 | <author initials="L." surname="Masinter" fullname="Larry Masinter"> |
---|
1041 | <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization> |
---|
1042 | <address><email>LMM@acm.org</email></address> |
---|
1043 | </author> |
---|
1044 | <author initials="P." surname="Leach" fullname="Paul J. Leach"> |
---|
1045 | <organization abbrev="Microsoft">Microsoft Corporation</organization> |
---|
1046 | <address><email>paulle@microsoft.com</email></address> |
---|
1047 | </author> |
---|
1048 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1049 | <organization abbrev="W3C/MIT">World Wide Web Consortium</organization> |
---|
1050 | <address><email>timbl@w3.org</email></address> |
---|
1051 | </author> |
---|
1052 | <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor"> |
---|
1053 | <organization abbrev="W3C">World Wide Web Consortium</organization> |
---|
1054 | <address><email>ylafon@w3.org</email></address> |
---|
1055 | </author> |
---|
1056 | <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"> |
---|
1057 | <organization abbrev="greenbytes">greenbytes GmbH</organization> |
---|
1058 | <address><email>julian.reschke@greenbytes.de</email></address> |
---|
1059 | </author> |
---|
1060 | <date month="&ID-MONTH;" year="&ID-YEAR;"/> |
---|
1061 | </front> |
---|
1062 | <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/> |
---|
1063 | <x:source href="p6-cache.xml" basename="p6-cache"/> |
---|
1064 | </reference> |
---|
1065 | |
---|
1066 | <reference anchor="RFC2119"> |
---|
1067 | <front> |
---|
1068 | <title>Key words for use in RFCs to Indicate Requirement Levels</title> |
---|
1069 | <author initials="S." surname="Bradner" fullname="Scott Bradner"> |
---|
1070 | <organization>Harvard University</organization> |
---|
1071 | <address><email>sob@harvard.edu</email></address> |
---|
1072 | </author> |
---|
1073 | <date month="March" year="1997"/> |
---|
1074 | </front> |
---|
1075 | <seriesInfo name="BCP" value="14"/> |
---|
1076 | <seriesInfo name="RFC" value="2119"/> |
---|
1077 | </reference> |
---|
1078 | |
---|
1079 | </references> |
---|
1080 | |
---|
1081 | <references title="Informative References"> |
---|
1082 | |
---|
1083 | <reference anchor="RFC2068"> |
---|
1084 | <front> |
---|
1085 | <title abbrev="HTTP/1.1">Hypertext Transfer Protocol -- HTTP/1.1</title> |
---|
1086 | <author initials="R." surname="Fielding" fullname="Roy T. Fielding"> |
---|
1087 | <organization>University of California, Irvine, Department of Information and Computer Science</organization> |
---|
1088 | <address><email>fielding@ics.uci.edu</email></address> |
---|
1089 | </author> |
---|
1090 | <author initials="J." surname="Gettys" fullname="Jim Gettys"> |
---|
1091 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1092 | <address><email>jg@w3.org</email></address> |
---|
1093 | </author> |
---|
1094 | <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul"> |
---|
1095 | <organization>Digital Equipment Corporation, Western Research Laboratory</organization> |
---|
1096 | <address><email>mogul@wrl.dec.com</email></address> |
---|
1097 | </author> |
---|
1098 | <author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen"> |
---|
1099 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1100 | <address><email>frystyk@w3.org</email></address> |
---|
1101 | </author> |
---|
1102 | <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"> |
---|
1103 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1104 | <address><email>timbl@w3.org</email></address> |
---|
1105 | </author> |
---|
1106 | <date month="January" year="1997"/> |
---|
1107 | </front> |
---|
1108 | <seriesInfo name="RFC" value="2068"/> |
---|
1109 | </reference> |
---|
1110 | |
---|
1111 | <reference anchor="RFC2616"> |
---|
1112 | <front> |
---|
1113 | <title>Hypertext Transfer Protocol -- HTTP/1.1</title> |
---|
1114 | <author initials="R." surname="Fielding" fullname="R. Fielding"> |
---|
1115 | <organization>University of California, Irvine</organization> |
---|
1116 | <address><email>fielding@ics.uci.edu</email></address> |
---|
1117 | </author> |
---|
1118 | <author initials="J." surname="Gettys" fullname="J. Gettys"> |
---|
1119 | <organization>W3C</organization> |
---|
1120 | <address><email>jg@w3.org</email></address> |
---|
1121 | </author> |
---|
1122 | <author initials="J." surname="Mogul" fullname="J. Mogul"> |
---|
1123 | <organization>Compaq Computer Corporation</organization> |
---|
1124 | <address><email>mogul@wrl.dec.com</email></address> |
---|
1125 | </author> |
---|
1126 | <author initials="H." surname="Frystyk" fullname="H. Frystyk"> |
---|
1127 | <organization>MIT Laboratory for Computer Science</organization> |
---|
1128 | <address><email>frystyk@w3.org</email></address> |
---|
1129 | </author> |
---|
1130 | <author initials="L." surname="Masinter" fullname="L. Masinter"> |
---|
1131 | <organization>Xerox Corporation</organization> |
---|
1132 | <address><email>masinter@parc.xerox.com</email></address> |
---|
1133 | </author> |
---|
1134 | <author initials="P." surname="Leach" fullname="P. Leach"> |
---|
1135 | <organization>Microsoft Corporation</organization> |
---|
1136 | <address><email>paulle@microsoft.com</email></address> |
---|
1137 | </author> |
---|
1138 | <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee"> |
---|
1139 | <organization>W3C</organization> |
---|
1140 | <address><email>timbl@w3.org</email></address> |
---|
1141 | </author> |
---|
1142 | <date month="June" year="1999"/> |
---|
1143 | </front> |
---|
1144 | <seriesInfo name="RFC" value="2616"/> |
---|
1145 | </reference> |
---|
1146 | |
---|
1147 | </references> |
---|
1148 | |
---|
1149 | <section title="Compatibility with Previous Versions" anchor="compatibility"> |
---|
1150 | |
---|
1151 | <section title="Changes from RFC 2616" anchor="changes.from.rfc.2616"> |
---|
1152 | </section> |
---|
1153 | |
---|
1154 | </section> |
---|
1155 | |
---|
1156 | <section title="Change Log (to be removed by RFC Editor before publication)"> |
---|
1157 | |
---|
1158 | <section title="Since RFC2616"> |
---|
1159 | <t> |
---|
1160 | Extracted relevant partitions from <xref target="RFC2616"/>. |
---|
1161 | </t> |
---|
1162 | </section> |
---|
1163 | |
---|
1164 | <section title="Since draft-ietf-httpbis-p4-conditional-00"> |
---|
1165 | <t> |
---|
1166 | Other changes: |
---|
1167 | <list style="symbols"> |
---|
1168 | <t> |
---|
1169 | Move definitions of 304 and 412 condition codes from Part2. |
---|
1170 | </t> |
---|
1171 | <t> |
---|
1172 | Categorize references as "Normative" or "Informative". |
---|
1173 | </t> |
---|
1174 | </list> |
---|
1175 | </t> |
---|
1176 | </section> |
---|
1177 | |
---|
1178 | </section> |
---|
1179 | |
---|
1180 | </back> |
---|
1181 | </rfc> |
---|