1 | <!DOCTYPE html |
---|
2 | PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
---|
3 | <html lang="en"> |
---|
4 | <head profile="http://www.w3.org/2006/03/hcard"> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
6 | <title>HTTP/1.1, part 4: Conditional Requests</title><style type="text/css" title="Xml2Rfc (sans serif)"> |
---|
7 | a { |
---|
8 | text-decoration: none; |
---|
9 | } |
---|
10 | a.smpl { |
---|
11 | color: black; |
---|
12 | } |
---|
13 | a:hover { |
---|
14 | text-decoration: underline; |
---|
15 | } |
---|
16 | a:active { |
---|
17 | text-decoration: underline; |
---|
18 | } |
---|
19 | address { |
---|
20 | margin-top: 1em; |
---|
21 | margin-left: 2em; |
---|
22 | font-style: normal; |
---|
23 | } |
---|
24 | body { |
---|
25 | color: black; |
---|
26 | font-family: verdana, helvetica, arial, sans-serif; |
---|
27 | font-size: 10pt; |
---|
28 | } |
---|
29 | cite { |
---|
30 | font-style: normal; |
---|
31 | } |
---|
32 | dd { |
---|
33 | margin-right: 2em; |
---|
34 | } |
---|
35 | dl { |
---|
36 | margin-left: 2em; |
---|
37 | } |
---|
38 | |
---|
39 | dl.empty dd { |
---|
40 | margin-top: .5em; |
---|
41 | } |
---|
42 | dl p { |
---|
43 | margin-left: 0em; |
---|
44 | } |
---|
45 | dt { |
---|
46 | margin-top: .5em; |
---|
47 | } |
---|
48 | h1 { |
---|
49 | font-size: 14pt; |
---|
50 | line-height: 21pt; |
---|
51 | page-break-after: avoid; |
---|
52 | } |
---|
53 | h1.np { |
---|
54 | page-break-before: always; |
---|
55 | } |
---|
56 | h1 a { |
---|
57 | color: #333333; |
---|
58 | } |
---|
59 | h2 { |
---|
60 | font-size: 12pt; |
---|
61 | line-height: 15pt; |
---|
62 | page-break-after: avoid; |
---|
63 | } |
---|
64 | h3, h4, h5, h6 { |
---|
65 | font-size: 10pt; |
---|
66 | page-break-after: avoid; |
---|
67 | } |
---|
68 | h2 a, h3 a, h4 a, h5 a, h6 a { |
---|
69 | color: black; |
---|
70 | } |
---|
71 | img { |
---|
72 | margin-left: 3em; |
---|
73 | } |
---|
74 | li { |
---|
75 | margin-left: 2em; |
---|
76 | margin-right: 2em; |
---|
77 | } |
---|
78 | ol { |
---|
79 | margin-left: 2em; |
---|
80 | margin-right: 2em; |
---|
81 | } |
---|
82 | ol p { |
---|
83 | margin-left: 0em; |
---|
84 | } |
---|
85 | p { |
---|
86 | margin-left: 2em; |
---|
87 | margin-right: 2em; |
---|
88 | } |
---|
89 | pre { |
---|
90 | margin-left: 3em; |
---|
91 | background-color: lightyellow; |
---|
92 | padding: .25em; |
---|
93 | } |
---|
94 | pre.text2 { |
---|
95 | border-style: dotted; |
---|
96 | border-width: 1px; |
---|
97 | background-color: #f0f0f0; |
---|
98 | width: 69em; |
---|
99 | } |
---|
100 | pre.inline { |
---|
101 | background-color: white; |
---|
102 | padding: 0em; |
---|
103 | } |
---|
104 | pre.text { |
---|
105 | border-style: dotted; |
---|
106 | border-width: 1px; |
---|
107 | background-color: #f8f8f8; |
---|
108 | width: 69em; |
---|
109 | } |
---|
110 | pre.drawing { |
---|
111 | border-style: solid; |
---|
112 | border-width: 1px; |
---|
113 | background-color: #f8f8f8; |
---|
114 | padding: 2em; |
---|
115 | } |
---|
116 | table { |
---|
117 | margin-left: 2em; |
---|
118 | } |
---|
119 | table.tt { |
---|
120 | vertical-align: top; |
---|
121 | } |
---|
122 | table.full { |
---|
123 | border-style: outset; |
---|
124 | border-width: 1px; |
---|
125 | } |
---|
126 | table.headers { |
---|
127 | border-style: outset; |
---|
128 | border-width: 1px; |
---|
129 | } |
---|
130 | table.tt td { |
---|
131 | vertical-align: top; |
---|
132 | } |
---|
133 | table.full td { |
---|
134 | border-style: inset; |
---|
135 | border-width: 1px; |
---|
136 | } |
---|
137 | table.tt th { |
---|
138 | vertical-align: top; |
---|
139 | } |
---|
140 | table.full th { |
---|
141 | border-style: inset; |
---|
142 | border-width: 1px; |
---|
143 | } |
---|
144 | table.headers th { |
---|
145 | border-style: none none inset none; |
---|
146 | border-width: 1px; |
---|
147 | } |
---|
148 | caption { |
---|
149 | caption-side: bottom; |
---|
150 | font-weight: bold; |
---|
151 | font-size: 9pt; |
---|
152 | margin-top: .5em; |
---|
153 | } |
---|
154 | |
---|
155 | table.header { |
---|
156 | width: 95%; |
---|
157 | font-size: 10pt; |
---|
158 | color: white; |
---|
159 | } |
---|
160 | td.top { |
---|
161 | vertical-align: top; |
---|
162 | } |
---|
163 | td.topnowrap { |
---|
164 | vertical-align: top; |
---|
165 | white-space: nowrap; |
---|
166 | } |
---|
167 | td.header { |
---|
168 | background-color: gray; |
---|
169 | width: 50%; |
---|
170 | } |
---|
171 | td.header a { |
---|
172 | color: white; |
---|
173 | } |
---|
174 | td.reference { |
---|
175 | vertical-align: top; |
---|
176 | white-space: nowrap; |
---|
177 | padding-right: 1em; |
---|
178 | } |
---|
179 | thead { |
---|
180 | display:table-header-group; |
---|
181 | } |
---|
182 | ul.toc { |
---|
183 | list-style: none; |
---|
184 | margin-left: 1.5em; |
---|
185 | margin-right: 0em; |
---|
186 | padding-left: 0em; |
---|
187 | } |
---|
188 | li.tocline0 { |
---|
189 | line-height: 150%; |
---|
190 | font-weight: bold; |
---|
191 | font-size: 10pt; |
---|
192 | margin-left: 0em; |
---|
193 | margin-right: 0em; |
---|
194 | } |
---|
195 | li.tocline1 { |
---|
196 | line-height: normal; |
---|
197 | font-weight: normal; |
---|
198 | font-size: 9pt; |
---|
199 | margin-left: 0em; |
---|
200 | margin-right: 0em; |
---|
201 | } |
---|
202 | li.tocline2 { |
---|
203 | font-size: 0pt; |
---|
204 | } |
---|
205 | ul p { |
---|
206 | margin-left: 0em; |
---|
207 | } |
---|
208 | ul.ind { |
---|
209 | list-style: none; |
---|
210 | margin-left: 1.5em; |
---|
211 | margin-right: 0em; |
---|
212 | padding-left: 0em; |
---|
213 | page-break-before: avoid; |
---|
214 | } |
---|
215 | li.indline0 { |
---|
216 | font-weight: bold; |
---|
217 | line-height: 200%; |
---|
218 | margin-left: 0em; |
---|
219 | margin-right: 0em; |
---|
220 | } |
---|
221 | li.indline1 { |
---|
222 | font-weight: normal; |
---|
223 | line-height: 150%; |
---|
224 | margin-left: 0em; |
---|
225 | margin-right: 0em; |
---|
226 | } |
---|
227 | .bcp14 { |
---|
228 | font-style: normal; |
---|
229 | text-transform: lowercase; |
---|
230 | font-variant: small-caps; |
---|
231 | } |
---|
232 | .comment { |
---|
233 | background-color: yellow; |
---|
234 | } |
---|
235 | .center { |
---|
236 | text-align: center; |
---|
237 | } |
---|
238 | .error { |
---|
239 | color: red; |
---|
240 | font-style: italic; |
---|
241 | font-weight: bold; |
---|
242 | } |
---|
243 | .figure { |
---|
244 | font-weight: bold; |
---|
245 | text-align: center; |
---|
246 | font-size: 9pt; |
---|
247 | } |
---|
248 | .filename { |
---|
249 | color: #333333; |
---|
250 | font-weight: bold; |
---|
251 | font-size: 12pt; |
---|
252 | line-height: 21pt; |
---|
253 | text-align: center; |
---|
254 | } |
---|
255 | .fn { |
---|
256 | font-weight: bold; |
---|
257 | } |
---|
258 | .hidden { |
---|
259 | display: none; |
---|
260 | } |
---|
261 | .left { |
---|
262 | text-align: left; |
---|
263 | } |
---|
264 | .right { |
---|
265 | text-align: right; |
---|
266 | } |
---|
267 | .title { |
---|
268 | color: #990000; |
---|
269 | font-size: 18pt; |
---|
270 | line-height: 18pt; |
---|
271 | font-weight: bold; |
---|
272 | text-align: center; |
---|
273 | margin-top: 36pt; |
---|
274 | } |
---|
275 | .vcardline { |
---|
276 | display: block; |
---|
277 | } |
---|
278 | .warning { |
---|
279 | font-size: 14pt; |
---|
280 | background-color: yellow; |
---|
281 | } |
---|
282 | |
---|
283 | |
---|
284 | @media print { |
---|
285 | .noprint { |
---|
286 | display: none; |
---|
287 | } |
---|
288 | |
---|
289 | a { |
---|
290 | color: black; |
---|
291 | text-decoration: none; |
---|
292 | } |
---|
293 | |
---|
294 | table.header { |
---|
295 | width: 90%; |
---|
296 | } |
---|
297 | |
---|
298 | td.header { |
---|
299 | width: 50%; |
---|
300 | color: black; |
---|
301 | background-color: white; |
---|
302 | vertical-align: top; |
---|
303 | font-size: 12pt; |
---|
304 | } |
---|
305 | |
---|
306 | ul.toc a::after { |
---|
307 | content: leader('.') target-counter(attr(href), page); |
---|
308 | } |
---|
309 | |
---|
310 | a.iref { |
---|
311 | content: target-counter(attr(href), page); |
---|
312 | } |
---|
313 | |
---|
314 | .print2col { |
---|
315 | column-count: 2; |
---|
316 | -moz-column-count: 2; |
---|
317 | column-fill: auto; |
---|
318 | } |
---|
319 | } |
---|
320 | |
---|
321 | @page { |
---|
322 | @top-left { |
---|
323 | content: "INTERNET DRAFT"; |
---|
324 | } |
---|
325 | @top-right { |
---|
326 | content: "February 2009"; |
---|
327 | } |
---|
328 | @top-center { |
---|
329 | content: "HTTP/1.1, Part 4"; |
---|
330 | } |
---|
331 | @bottom-left { |
---|
332 | content: "Fielding, et al."; |
---|
333 | } |
---|
334 | @bottom-center { |
---|
335 | content: "Standards Track"; |
---|
336 | } |
---|
337 | @bottom-right { |
---|
338 | content: "[Page " counter(page) "]"; |
---|
339 | } |
---|
340 | } |
---|
341 | |
---|
342 | @page:first { |
---|
343 | @top-left { |
---|
344 | content: normal; |
---|
345 | } |
---|
346 | @top-right { |
---|
347 | content: normal; |
---|
348 | } |
---|
349 | @top-center { |
---|
350 | content: normal; |
---|
351 | } |
---|
352 | } |
---|
353 | </style><link rel="Contents" href="#rfc.toc"> |
---|
354 | <link rel="Author" href="#rfc.authors"> |
---|
355 | <link rel="Copyright" href="#rfc.copyright"> |
---|
356 | <link rel="Index" href="#rfc.index"> |
---|
357 | <link rel="Chapter" title="1 Introduction" href="#rfc.section.1"> |
---|
358 | <link rel="Chapter" title="2 Entity Tags" href="#rfc.section.2"> |
---|
359 | <link rel="Chapter" title="3 Status Code Definitions" href="#rfc.section.3"> |
---|
360 | <link rel="Chapter" title="4 Weak and Strong Validators" href="#rfc.section.4"> |
---|
361 | <link rel="Chapter" title="5 Rules for When to Use Entity Tags and Last-Modified Dates" href="#rfc.section.5"> |
---|
362 | <link rel="Chapter" title="6 Header Field Definitions" href="#rfc.section.6"> |
---|
363 | <link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7"> |
---|
364 | <link rel="Chapter" title="8 Security Considerations" href="#rfc.section.8"> |
---|
365 | <link rel="Chapter" title="9 Acknowledgments" href="#rfc.section.9"> |
---|
366 | <link rel="Chapter" href="#rfc.section.10" title="10 References"> |
---|
367 | <link rel="Appendix" title="A Compatibility with Previous Versions" href="#rfc.section.A"> |
---|
368 | <link rel="Appendix" title="B Collected ABNF" href="#rfc.section.B"> |
---|
369 | <link rel="Appendix" title="C Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.C"> |
---|
370 | <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.424, 2009-02-24 16:15:29, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/"> |
---|
371 | <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"> |
---|
372 | <meta name="DC.Creator" content="Fielding, R."> |
---|
373 | <meta name="DC.Creator" content="Gettys, J."> |
---|
374 | <meta name="DC.Creator" content="Mogul, J."> |
---|
375 | <meta name="DC.Creator" content="Frystyk, H."> |
---|
376 | <meta name="DC.Creator" content="Masinter, L."> |
---|
377 | <meta name="DC.Creator" content="Leach, P."> |
---|
378 | <meta name="DC.Creator" content="Berners-Lee, T."> |
---|
379 | <meta name="DC.Creator" content="Lafon, Y."> |
---|
380 | <meta name="DC.Creator" content="Reschke, J. F."> |
---|
381 | <meta name="DC.Identifier" content="urn:ietf:id:draft-ietf-httpbis-p4-conditional-latest"> |
---|
382 | <meta name="DC.Date.Issued" scheme="ISO8601" content="2009-02"> |
---|
383 | <meta name="DC.Relation.Replaces" content="urn:ietf:rfc:2616"> |
---|
384 | <meta name="DC.Description.Abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 4 of the seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part 4 defines request header fields for indicating conditional requests and the rules for constructing responses to those requests."> |
---|
385 | </head> |
---|
386 | <body> |
---|
387 | <table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"> |
---|
388 | <tr> |
---|
389 | <td class="header left">HTTPbis Working Group</td> |
---|
390 | <td class="header right">R. Fielding, Editor</td> |
---|
391 | </tr> |
---|
392 | <tr> |
---|
393 | <td class="header left">Internet Draft</td> |
---|
394 | <td class="header right">Day Software</td> |
---|
395 | </tr> |
---|
396 | <tr> |
---|
397 | <td class="header left"> |
---|
398 | <draft-ietf-httpbis-p4-conditional-latest> |
---|
399 | |
---|
400 | </td> |
---|
401 | <td class="header right">J. Gettys</td> |
---|
402 | </tr> |
---|
403 | <tr> |
---|
404 | <td class="header left">Obsoletes: <a href="http://tools.ietf.org/html/rfc2616">2616</a> (if approved) |
---|
405 | </td> |
---|
406 | <td class="header right">One Laptop per Child</td> |
---|
407 | </tr> |
---|
408 | <tr> |
---|
409 | <td class="header left">Intended status: Standards Track</td> |
---|
410 | <td class="header right">J. Mogul</td> |
---|
411 | </tr> |
---|
412 | <tr> |
---|
413 | <td class="header left">Expires: August 2009</td> |
---|
414 | <td class="header right">HP</td> |
---|
415 | </tr> |
---|
416 | <tr> |
---|
417 | <td class="header left"></td> |
---|
418 | <td class="header right">H. Frystyk</td> |
---|
419 | </tr> |
---|
420 | <tr> |
---|
421 | <td class="header left"></td> |
---|
422 | <td class="header right">Microsoft</td> |
---|
423 | </tr> |
---|
424 | <tr> |
---|
425 | <td class="header left"></td> |
---|
426 | <td class="header right">L. Masinter</td> |
---|
427 | </tr> |
---|
428 | <tr> |
---|
429 | <td class="header left"></td> |
---|
430 | <td class="header right">Adobe Systems</td> |
---|
431 | </tr> |
---|
432 | <tr> |
---|
433 | <td class="header left"></td> |
---|
434 | <td class="header right">P. Leach</td> |
---|
435 | </tr> |
---|
436 | <tr> |
---|
437 | <td class="header left"></td> |
---|
438 | <td class="header right">Microsoft</td> |
---|
439 | </tr> |
---|
440 | <tr> |
---|
441 | <td class="header left"></td> |
---|
442 | <td class="header right">T. Berners-Lee</td> |
---|
443 | </tr> |
---|
444 | <tr> |
---|
445 | <td class="header left"></td> |
---|
446 | <td class="header right">W3C/MIT</td> |
---|
447 | </tr> |
---|
448 | <tr> |
---|
449 | <td class="header left"></td> |
---|
450 | <td class="header right">Y. Lafon, Editor</td> |
---|
451 | </tr> |
---|
452 | <tr> |
---|
453 | <td class="header left"></td> |
---|
454 | <td class="header right">W3C</td> |
---|
455 | </tr> |
---|
456 | <tr> |
---|
457 | <td class="header left"></td> |
---|
458 | <td class="header right">J. F. Reschke, Editor</td> |
---|
459 | </tr> |
---|
460 | <tr> |
---|
461 | <td class="header left"></td> |
---|
462 | <td class="header right">greenbytes</td> |
---|
463 | </tr> |
---|
464 | <tr> |
---|
465 | <td class="header left"></td> |
---|
466 | <td class="header right">February 28, 2009</td> |
---|
467 | </tr> |
---|
468 | </table> |
---|
469 | <p class="title">HTTP/1.1, part 4: Conditional Requests<br><span class="filename">draft-ietf-httpbis-p4-conditional-latest</span></p> |
---|
470 | <h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1> |
---|
471 | <p>This Internet-Draft is submitted to IETF pursuant to, and in full conformance with, the provisions of BCP 78 and BCP 79. This |
---|
472 | document may contain material from IETF Documents or IETF Contributions published or made publicly available before November |
---|
473 | 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to |
---|
474 | allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) |
---|
475 | controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative |
---|
476 | works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate |
---|
477 | it into languages other than English. |
---|
478 | </p> |
---|
479 | <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note |
---|
480 | that other groups may also distribute working documents as Internet-Drafts. |
---|
481 | </p> |
---|
482 | <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other |
---|
483 | documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work |
---|
484 | in progress”. |
---|
485 | </p> |
---|
486 | <p>The list of current Internet-Drafts can be accessed at <<a href="http://www.ietf.org/ietf/1id-abstracts.txt">http://www.ietf.org/ietf/1id-abstracts.txt</a>>. |
---|
487 | </p> |
---|
488 | <p>The list of Internet-Draft Shadow Directories can be accessed at <<a href="http://www.ietf.org/shadow.html">http://www.ietf.org/shadow.html</a>>. |
---|
489 | </p> |
---|
490 | <p>This Internet-Draft will expire in August 2009.</p> |
---|
491 | <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> |
---|
492 | <p>Copyright © 2009 IETF Trust and the persons identified as the document authors. All rights reserved.</p> |
---|
493 | <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date |
---|
494 | of publication of this document (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>). Please review these documents carefully, as they describe your rights and restrictions with respect to this document. |
---|
495 | </p> |
---|
496 | <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> |
---|
497 | <p>The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information |
---|
498 | systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 4 of the |
---|
499 | seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616. Part |
---|
500 | 4 defines request header fields for indicating conditional requests and the rules for constructing responses to those requests. |
---|
501 | </p> |
---|
502 | <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1> |
---|
503 | <p>Discussion of this draft should take place on the HTTPBIS working group mailing list (ietf-http-wg@w3.org). The current issues |
---|
504 | list is at <<a href="http://tools.ietf.org/wg/httpbis/trac/report/11">http://tools.ietf.org/wg/httpbis/trac/report/11</a>> and related documents (including fancy diffs) can be found at <<a href="http://tools.ietf.org/wg/httpbis/">http://tools.ietf.org/wg/httpbis/</a>>. |
---|
505 | </p> |
---|
506 | <p>The changes in this draft are summarized in <a href="#changes.since.05" title="Since draft-ietf-httpbis-p4-conditional-05">Appendix C.7</a>. |
---|
507 | </p> |
---|
508 | <hr class="noprint"> |
---|
509 | <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1> |
---|
510 | <ul class="toc"> |
---|
511 | <li class="tocline0">1. <a href="#introduction">Introduction</a><ul class="toc"> |
---|
512 | <li class="tocline1">1.1 <a href="#intro.requirements">Requirements</a></li> |
---|
513 | <li class="tocline1">1.2 <a href="#notation">Syntax Notation</a><ul class="toc"> |
---|
514 | <li class="tocline1">1.2.1 <a href="#core.rules">Core Rules</a></li> |
---|
515 | <li class="tocline1">1.2.2 <a href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></li> |
---|
516 | </ul> |
---|
517 | </li> |
---|
518 | </ul> |
---|
519 | </li> |
---|
520 | <li class="tocline0">2. <a href="#entity.tags">Entity Tags</a></li> |
---|
521 | <li class="tocline0">3. <a href="#rfc.section.3">Status Code Definitions</a><ul class="toc"> |
---|
522 | <li class="tocline1">3.1 <a href="#status.304">304 Not Modified</a></li> |
---|
523 | <li class="tocline1">3.2 <a href="#status.412">412 Precondition Failed</a></li> |
---|
524 | </ul> |
---|
525 | </li> |
---|
526 | <li class="tocline0">4. <a href="#weak.and.strong.validators">Weak and Strong Validators</a></li> |
---|
527 | <li class="tocline0">5. <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates">Rules for When to Use Entity Tags and Last-Modified Dates</a></li> |
---|
528 | <li class="tocline0">6. <a href="#header.fields">Header Field Definitions</a><ul class="toc"> |
---|
529 | <li class="tocline1">6.1 <a href="#header.etag">ETag</a></li> |
---|
530 | <li class="tocline1">6.2 <a href="#header.if-match">If-Match</a></li> |
---|
531 | <li class="tocline1">6.3 <a href="#header.if-modified-since">If-Modified-Since</a></li> |
---|
532 | <li class="tocline1">6.4 <a href="#header.if-none-match">If-None-Match</a></li> |
---|
533 | <li class="tocline1">6.5 <a href="#header.if-unmodified-since">If-Unmodified-Since</a></li> |
---|
534 | <li class="tocline1">6.6 <a href="#header.last-modified">Last-Modified</a></li> |
---|
535 | </ul> |
---|
536 | </li> |
---|
537 | <li class="tocline0">7. <a href="#IANA.considerations">IANA Considerations</a><ul class="toc"> |
---|
538 | <li class="tocline1">7.1 <a href="#message.header.registration">Message Header Registration</a></li> |
---|
539 | </ul> |
---|
540 | </li> |
---|
541 | <li class="tocline0">8. <a href="#security.considerations">Security Considerations</a></li> |
---|
542 | <li class="tocline0">9. <a href="#ack">Acknowledgments</a></li> |
---|
543 | <li class="tocline0">10. <a href="#rfc.references">References</a><ul class="toc"> |
---|
544 | <li class="tocline1">10.1 <a href="#rfc.references.1">Normative References</a></li> |
---|
545 | <li class="tocline1">10.2 <a href="#rfc.references.2">Informative References</a></li> |
---|
546 | </ul> |
---|
547 | </li> |
---|
548 | <li class="tocline0"><a href="#rfc.authors">Authors' Addresses</a></li> |
---|
549 | <li class="tocline0">A. <a href="#compatibility">Compatibility with Previous Versions</a><ul class="toc"> |
---|
550 | <li class="tocline1">A.1 <a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li> |
---|
551 | </ul> |
---|
552 | </li> |
---|
553 | <li class="tocline0">B. <a href="#collected.abnf">Collected ABNF</a></li> |
---|
554 | <li class="tocline0">C. <a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a><ul class="toc"> |
---|
555 | <li class="tocline1">C.1 <a href="#rfc.section.C.1">Since RFC2616</a></li> |
---|
556 | <li class="tocline1">C.2 <a href="#rfc.section.C.2">Since draft-ietf-httpbis-p4-conditional-00</a></li> |
---|
557 | <li class="tocline1">C.3 <a href="#rfc.section.C.3">Since draft-ietf-httpbis-p4-conditional-01</a></li> |
---|
558 | <li class="tocline1">C.4 <a href="#changes.since.02">Since draft-ietf-httpbis-p4-conditional-02</a></li> |
---|
559 | <li class="tocline1">C.5 <a href="#changes.since.03">Since draft-ietf-httpbis-p4-conditional-03</a></li> |
---|
560 | <li class="tocline1">C.6 <a href="#changes.since.04">Since draft-ietf-httpbis-p4-conditional-04</a></li> |
---|
561 | <li class="tocline1">C.7 <a href="#changes.since.05">Since draft-ietf-httpbis-p4-conditional-05</a></li> |
---|
562 | </ul> |
---|
563 | </li> |
---|
564 | <li class="tocline0"><a href="#rfc.index">Index</a></li> |
---|
565 | </ul> |
---|
566 | <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> <a id="introduction" href="#introduction">Introduction</a></h1> |
---|
567 | <p id="rfc.section.1.p.1">This document defines HTTP/1.1 response metadata for indicating potential changes to payload content, including modification |
---|
568 | time stamps and opaque entity-tags, and the HTTP conditional request mechanisms that allow preconditions to be placed on a |
---|
569 | request method. Conditional GET requests allow for efficient cache updates. Other conditional request methods are used to |
---|
570 | protect against overwriting or misunderstanding the state of a resource that has been changed unbeknownst to the requesting |
---|
571 | client. |
---|
572 | </p> |
---|
573 | <p id="rfc.section.1.p.2">This document is currently disorganized in order to minimize the changes between drafts and enable reviewers to see the smaller |
---|
574 | errata changes. The next draft will reorganize the sections to better reflect the content. In particular, the sections on |
---|
575 | resource metadata will be discussed first and then followed by each conditional request-header, concluding with a definition |
---|
576 | of precedence and the expectation of ordering strong validator checks before weak validator checks. It is likely that more |
---|
577 | content from <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a> will migrate to this part, where appropriate. The current mess reflects how widely dispersed these topics and associated requirements |
---|
578 | had become in <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. |
---|
579 | </p> |
---|
580 | <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> <a id="intro.requirements" href="#intro.requirements">Requirements</a></h2> |
---|
581 | <p id="rfc.section.1.1.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" |
---|
582 | in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>. |
---|
583 | </p> |
---|
584 | <p id="rfc.section.1.1.p.2">An implementation is not compliant if it fails to satisfy one or more of the <em class="bcp14">MUST</em> or <em class="bcp14">REQUIRED</em> level requirements for the protocols it implements. An implementation that satisfies all the <em class="bcp14">MUST</em> or <em class="bcp14">REQUIRED</em> level and all the <em class="bcp14">SHOULD</em> level requirements for its protocols is said to be "unconditionally compliant"; one that satisfies all the <em class="bcp14">MUST</em> level requirements but not all the <em class="bcp14">SHOULD</em> level requirements for its protocols is said to be "conditionally compliant." |
---|
585 | </p> |
---|
586 | <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a> <a id="notation" href="#notation">Syntax Notation</a></h2> |
---|
587 | <p id="rfc.section.1.2.p.1">This specification uses the ABNF syntax defined in <a href="p1-messaging.html#notation" title="Syntax Notation">Section 1.2</a> of <a href="#Part1" id="rfc.xref.Part1.1"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. The following core rules are included by reference, as defined in <a href="#RFC5234" id="rfc.xref.RFC5234.1"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>, <a href="http://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG |
---|
588 | (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), VCHAR (any visible USASCII character), |
---|
589 | and WSP (whitespace). |
---|
590 | </p> |
---|
591 | <h3 id="rfc.section.1.2.1"><a href="#rfc.section.1.2.1">1.2.1</a> <a id="core.rules" href="#core.rules">Core Rules</a></h3> |
---|
592 | <p id="rfc.section.1.2.1.p.1">The core rules below are defined in <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 1.2.2</a> of <a href="#Part1" id="rfc.xref.Part1.2"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>: |
---|
593 | </p> |
---|
594 | <div id="rfc.figure.u.1"></div><pre class="inline"> <a href="#core.rules" class="smpl">quoted-string</a> = <quoted-string, defined in <a href="#Part1" id="rfc.xref.Part1.3"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 1.2.2</a>> |
---|
595 | <a href="#core.rules" class="smpl">OWS</a> = <OWS, defined in <a href="#Part1" id="rfc.xref.Part1.4"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#basic.rules" title="Basic Rules">Section 1.2.2</a>> |
---|
596 | </pre><h3 id="rfc.section.1.2.2"><a href="#rfc.section.1.2.2">1.2.2</a> <a id="abnf.dependencies" href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></h3> |
---|
597 | <p id="rfc.section.1.2.2.p.1">The ABNF rules below are defined in other parts:</p> |
---|
598 | <div id="rfc.figure.u.2"></div><pre class="inline"> <a href="#abnf.dependencies" class="smpl">HTTP-date</a> = <HTTP-date, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#full.date" title="Full Date">Section 3.2.1</a>> |
---|
599 | </pre><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a id="entity.tags" href="#entity.tags">Entity Tags</a></h1> |
---|
600 | <p id="rfc.section.2.p.1">Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the |
---|
601 | ETag (<a href="#header.etag" id="rfc.xref.header.etag.1" title="ETag">Section 6.1</a>), If-Match (<a href="#header.if-match" id="rfc.xref.header.if-match.1" title="If-Match">Section 6.2</a>), If-None-Match (<a href="#header.if-none-match" id="rfc.xref.header.if-none-match.1" title="If-None-Match">Section 6.4</a>), and If-Range (<a href="p5-range.html#header.if-range" title="If-Range">Section 5.3</a> of <a href="#Part5" id="rfc.xref.Part5.1"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) header fields. The definition of how they are used and compared as cache validators is in <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a>. An entity tag consists of an opaque quoted string, possibly prefixed by a weakness indicator. |
---|
602 | </p> |
---|
603 | <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span> <a href="#entity.tags" class="smpl">entity-tag</a> = [ <a href="#entity.tags" class="smpl">weak</a> ] <a href="#entity.tags" class="smpl">opaque-tag</a> |
---|
604 | <a href="#entity.tags" class="smpl">weak</a> = "W/" |
---|
605 | <a href="#entity.tags" class="smpl">opaque-tag</a> = <a href="#core.rules" class="smpl">quoted-string</a> |
---|
606 | </pre><p id="rfc.section.2.p.3">A "strong entity tag" <em class="bcp14">MAY</em> be shared by two entities of a resource only if they are equivalent by octet equality. |
---|
607 | </p> |
---|
608 | <p id="rfc.section.2.p.4">A "weak entity tag," indicated by the "W/" prefix, <em class="bcp14">MAY</em> be shared by two entities of a resource only if the entities are equivalent and could be substituted for each other with no |
---|
609 | significant change in semantics. A weak entity tag can only be used for weak comparison. |
---|
610 | </p> |
---|
611 | <p id="rfc.section.2.p.5">An entity tag <em class="bcp14">MUST</em> be unique across all versions of all entities associated with a particular resource. A given entity tag value <em class="bcp14">MAY</em> be used for entities obtained by requests on different URIs. The use of the same entity tag value in conjunction with entities |
---|
612 | obtained by requests on different URIs does not imply the equivalence of those entities. |
---|
613 | </p> |
---|
614 | <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> Status Code Definitions |
---|
615 | </h1> |
---|
616 | <div id="rfc.iref.3"></div> |
---|
617 | <div id="rfc.iref.s.1"></div> |
---|
618 | <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> <a id="status.304" href="#status.304">304 Not Modified</a></h2> |
---|
619 | <p id="rfc.section.3.1.p.1">If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server <em class="bcp14">SHOULD</em> respond with this status code. The 304 response <em class="bcp14">MUST NOT</em> contain a message-body, and thus is always terminated by the first empty line after the header fields. |
---|
620 | </p> |
---|
621 | <p id="rfc.section.3.1.p.2">The response <em class="bcp14">MUST</em> include the following header fields: |
---|
622 | </p> |
---|
623 | <ul> |
---|
624 | <li> |
---|
625 | <p>Date, unless its omission is required by <a href="p1-messaging.html#clockless.origin.server.operation" title="Clockless Origin Server Operation">Section 8.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. |
---|
626 | </p> |
---|
627 | <p>If a clockless origin server obeys these rules, and proxies and clients add their own Date to any response received without |
---|
628 | one (as already specified by <a href="p1-messaging.html#header.date" title="Date">Section 8.3</a> of <a href="#Part1" id="rfc.xref.Part1.7"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, caches will operate correctly. |
---|
629 | </p> |
---|
630 | </li> |
---|
631 | <li> |
---|
632 | <p>ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request.</p> |
---|
633 | </li> |
---|
634 | <li> |
---|
635 | <p>Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous response for the same |
---|
636 | variant. |
---|
637 | </p> |
---|
638 | </li> |
---|
639 | </ul> |
---|
640 | <p id="rfc.section.3.1.p.3">If the conditional GET used a strong cache validator (see <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a>), the response <em class="bcp14">SHOULD NOT</em> include other entity-headers. Otherwise (i.e., the conditional GET used a weak validator), the response <em class="bcp14">MUST NOT</em> include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers. |
---|
641 | </p> |
---|
642 | <p id="rfc.section.3.1.p.4">If a 304 response indicates an entity not currently cached, then the cache <em class="bcp14">MUST</em> disregard the response and repeat the request without the conditional. |
---|
643 | </p> |
---|
644 | <p id="rfc.section.3.1.p.5">If a cache uses a received 304 response to update a cache entry, the cache <em class="bcp14">MUST</em> update the entry to reflect any new field values given in the response. |
---|
645 | </p> |
---|
646 | <div id="rfc.iref.4"></div> |
---|
647 | <div id="rfc.iref.s.2"></div> |
---|
648 | <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="status.412" href="#status.412">412 Precondition Failed</a></h2> |
---|
649 | <p id="rfc.section.3.2.p.1">The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This |
---|
650 | response code allows the client to place preconditions on the current resource metainformation (header field data) and thus |
---|
651 | prevent the requested method from being applied to a resource other than the one intended. |
---|
652 | </p> |
---|
653 | <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="weak.and.strong.validators" href="#weak.and.strong.validators">Weak and Strong Validators</a></h1> |
---|
654 | <p id="rfc.section.4.p.1">Since both origin servers and caches will compare two validators to decide if they represent the same or different entities, |
---|
655 | one normally would expect that if the entity (the entity-body or any entity-headers) changes in any way, then the associated |
---|
656 | validator would change as well. If this is true, then we call this validator a "strong validator." |
---|
657 | </p> |
---|
658 | <p id="rfc.section.4.p.2">However, there might be cases when a server prefers to change the validator only on semantically significant changes, and |
---|
659 | not when insignificant aspects of the entity change. A validator that does not always change when the resource changes is |
---|
660 | a "weak validator." |
---|
661 | </p> |
---|
662 | <p id="rfc.section.4.p.3">Entity tags are normally "strong validators," but the protocol provides a mechanism to tag an entity tag as "weak." One can |
---|
663 | think of a strong validator as one that changes whenever the bits of an entity changes, while a weak value changes whenever |
---|
664 | the meaning of an entity changes. Alternatively, one can think of a strong validator as part of an identifier for a specific |
---|
665 | entity, while a weak validator is part of an identifier for a set of semantically equivalent entities. |
---|
666 | </p> |
---|
667 | <dl class="empty"> |
---|
668 | <dd> <b>Note:</b> One example of a strong validator is an integer that is incremented in stable storage every time an entity is changed. |
---|
669 | </dd> |
---|
670 | <dd>An entity's modification time, if represented with one-second resolution, could be a weak validator, since it is possible |
---|
671 | that the resource might be modified twice during a single second. |
---|
672 | </dd> |
---|
673 | <dd>Support for weak validators is optional. However, weak validators allow for more efficient caching of equivalent objects; |
---|
674 | for example, a hit counter on a site is probably good enough if it is updated every few days or weeks, and any value during |
---|
675 | that period is likely "good enough" to be equivalent. |
---|
676 | </dd> |
---|
677 | </dl> |
---|
678 | <p id="rfc.section.4.p.4">A "use" of a validator is either when a client generates a request and includes the validator in a validating header field, |
---|
679 | or when a server compares two validators. |
---|
680 | </p> |
---|
681 | <p id="rfc.section.4.p.5">Strong validators are usable in any context. Weak validators are only usable in contexts that do not depend on exact equality |
---|
682 | of an entity. For example, either kind is usable for a conditional GET of a full entity. However, only a strong validator |
---|
683 | is usable for a sub-range retrieval, since otherwise the client might end up with an internally inconsistent entity. |
---|
684 | </p> |
---|
685 | <p id="rfc.section.4.p.6">Clients <em class="bcp14">MUST NOT</em> use weak validators in range requests (<a href="#Part5" id="rfc.xref.Part5.2"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>). |
---|
686 | </p> |
---|
687 | <p id="rfc.section.4.p.7">The only function that HTTP/1.1 defines on validators is comparison. There are two validator comparison functions, depending |
---|
688 | on whether the comparison context allows the use of weak validators or not: |
---|
689 | </p> |
---|
690 | <ul> |
---|
691 | <li>The strong comparison function: in order to be considered equal, both opaque-tags <em class="bcp14">MUST</em> be identical character-by-character, and both <em class="bcp14">MUST NOT</em> be weak. |
---|
692 | </li> |
---|
693 | <li>The weak comparison function: in order to be considered equal, both opaque-tags <em class="bcp14">MUST</em> be identical character-by-character. |
---|
694 | </li> |
---|
695 | </ul> |
---|
696 | <p id="rfc.section.4.p.8">The example below shows the results for a set of entity tag pairs, and both the weak and strong comparison function results:</p> |
---|
697 | <div id="rfc.table.u.1"> |
---|
698 | <table summary="" class="tt full" cellpadding="3" cellspacing="0"> |
---|
699 | <thead> |
---|
700 | <tr> |
---|
701 | <th>ETag 1</th> |
---|
702 | <th>ETag 2</th> |
---|
703 | <th>Strong Comparison</th> |
---|
704 | <th>Weak Comparison</th> |
---|
705 | </tr> |
---|
706 | </thead> |
---|
707 | <tbody> |
---|
708 | <tr> |
---|
709 | <td>W/"1"</td> |
---|
710 | <td>W/"1"</td> |
---|
711 | <td>no match</td> |
---|
712 | <td>match</td> |
---|
713 | </tr> |
---|
714 | <tr> |
---|
715 | <td>W/"1"</td> |
---|
716 | <td>W/"2"</td> |
---|
717 | <td>no match</td> |
---|
718 | <td>no match</td> |
---|
719 | </tr> |
---|
720 | <tr> |
---|
721 | <td>W/"1"</td> |
---|
722 | <td>"1"</td> |
---|
723 | <td>no match</td> |
---|
724 | <td>match</td> |
---|
725 | </tr> |
---|
726 | <tr> |
---|
727 | <td>"1"</td> |
---|
728 | <td>"1"</td> |
---|
729 | <td>match</td> |
---|
730 | <td>match</td> |
---|
731 | </tr> |
---|
732 | </tbody> |
---|
733 | </table> |
---|
734 | </div> |
---|
735 | <p id="rfc.section.4.p.9">An entity tag is strong unless it is explicitly tagged as weak. <a href="#entity.tags" title="Entity Tags">Section 2</a> gives the syntax for entity tags. |
---|
736 | </p> |
---|
737 | <p id="rfc.section.4.p.10">A Last-Modified time, when used as a validator in a request, is implicitly weak unless it is possible to deduce that it is |
---|
738 | strong, using the following rules: |
---|
739 | </p> |
---|
740 | <ul> |
---|
741 | <li>The validator is being compared by an origin server to the actual current validator for the entity and,</li> |
---|
742 | <li>That origin server reliably knows that the associated entity did not change twice during the second covered by the presented |
---|
743 | validator. |
---|
744 | </li> |
---|
745 | </ul> |
---|
746 | <p id="rfc.section.4.p.11">or </p> |
---|
747 | <ul> |
---|
748 | <li>The validator is about to be used by a client in an If-Modified-Since or If-Unmodified-Since header, because the client has |
---|
749 | a cache entry for the associated entity, and |
---|
750 | </li> |
---|
751 | <li>That cache entry includes a Date value, which gives the time when the origin server sent the original response, and</li> |
---|
752 | <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li> |
---|
753 | </ul> |
---|
754 | <p id="rfc.section.4.p.12">or </p> |
---|
755 | <ul> |
---|
756 | <li>The validator is being compared by an intermediate cache to the validator stored in its cache entry for the entity, and</li> |
---|
757 | <li>That cache entry includes a Date value, which gives the time when the origin server sent the original response, and</li> |
---|
758 | <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li> |
---|
759 | </ul> |
---|
760 | <p id="rfc.section.4.p.13">This method relies on the fact that if two different responses were sent by the origin server during the same second, but |
---|
761 | both had the same Last-Modified time, then at least one of those responses would have a Date value equal to its Last-Modified |
---|
762 | time. The arbitrary 60-second limit guards against the possibility that the Date and Last-Modified values are generated from |
---|
763 | different clocks, or at somewhat different times during the preparation of the response. An implementation <em class="bcp14">MAY</em> use a value larger than 60 seconds, if it is believed that 60 seconds is too short. |
---|
764 | </p> |
---|
765 | <p id="rfc.section.4.p.14">If a client wishes to perform a sub-range retrieval on a value for which it has only a Last-Modified time and no opaque validator, |
---|
766 | it <em class="bcp14">MAY</em> do this only if the Last-Modified time is strong in the sense described here. |
---|
767 | </p> |
---|
768 | <p id="rfc.section.4.p.15">A cache or origin server receiving a conditional range request (<a href="#Part5" id="rfc.xref.Part5.3"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) <em class="bcp14">MUST</em> use the strong comparison function to evaluate the condition. |
---|
769 | </p> |
---|
770 | <p id="rfc.section.4.p.16">These rules allow HTTP/1.1 caches and clients to safely perform sub-range retrievals on values that have been obtained from |
---|
771 | HTTP/1.0 servers. |
---|
772 | </p> |
---|
773 | <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="rules.for.when.to.use.entity.tags.and.last-modified.dates" href="#rules.for.when.to.use.entity.tags.and.last-modified.dates">Rules for When to Use Entity Tags and Last-Modified Dates</a></h1> |
---|
774 | <p id="rfc.section.5.p.1">We adopt a set of rules and recommendations for origin servers, clients, and caches regarding when various validator types |
---|
775 | ought to be used, and for what purposes. |
---|
776 | </p> |
---|
777 | <p id="rfc.section.5.p.2">HTTP/1.1 origin servers: </p> |
---|
778 | <ul> |
---|
779 | <li><em class="bcp14">SHOULD</em> send an entity tag validator unless it is not feasible to generate one. |
---|
780 | </li> |
---|
781 | <li><em class="bcp14">MAY</em> send a weak entity tag instead of a strong entity tag, if performance considerations support the use of weak entity tags, |
---|
782 | or if it is unfeasible to send a strong entity tag. |
---|
783 | </li> |
---|
784 | <li><em class="bcp14">SHOULD</em> send a Last-Modified value if it is feasible to send one, unless the risk of a breakdown in semantic transparency that could |
---|
785 | result from using this date in an If-Modified-Since header would lead to serious problems. |
---|
786 | </li> |
---|
787 | </ul> |
---|
788 | <p id="rfc.section.5.p.3">In other words, the preferred behavior for an HTTP/1.1 origin server is to send both a strong entity tag and a Last-Modified |
---|
789 | value. |
---|
790 | </p> |
---|
791 | <p id="rfc.section.5.p.4">In order to be legal, a strong entity tag <em class="bcp14">MUST</em> change whenever the associated entity changes in any way. A weak entity tag <em class="bcp14">SHOULD</em> change whenever the associated entity changes in a semantically significant way. |
---|
792 | </p> |
---|
793 | <dl class="empty"> |
---|
794 | <dd> <b>Note:</b> in order to provide semantically transparent caching, an origin server must avoid reusing a specific strong entity tag value |
---|
795 | for two different entities, or reusing a specific weak entity tag value for two semantically different entities. Cache entries |
---|
796 | might persist for arbitrarily long periods, regardless of expiration times, so it might be inappropriate to expect that a |
---|
797 | cache will never again attempt to validate an entry using a validator that it obtained at some point in the past. |
---|
798 | </dd> |
---|
799 | </dl> |
---|
800 | <p id="rfc.section.5.p.5">HTTP/1.1 clients: </p> |
---|
801 | <ul> |
---|
802 | <li>If an entity tag has been provided by the origin server, <em class="bcp14">MUST</em> use that entity tag in any cache-conditional request (using If-Match or If-None-Match). |
---|
803 | </li> |
---|
804 | <li>If only a Last-Modified value has been provided by the origin server, <em class="bcp14">SHOULD</em> use that value in non-subrange cache-conditional requests (using If-Modified-Since). |
---|
805 | </li> |
---|
806 | <li>If only a Last-Modified value has been provided by an HTTP/1.0 origin server, <em class="bcp14">MAY</em> use that value in subrange cache-conditional requests (using If-Unmodified-Since:). The user agent <em class="bcp14">SHOULD</em> provide a way to disable this, in case of difficulty. |
---|
807 | </li> |
---|
808 | <li>If both an entity tag and a Last-Modified value have been provided by the origin server, <em class="bcp14">SHOULD</em> use both validators in cache-conditional requests. This allows both HTTP/1.0 and HTTP/1.1 caches to respond appropriately. |
---|
809 | </li> |
---|
810 | </ul> |
---|
811 | <p id="rfc.section.5.p.6">An HTTP/1.1 origin server, upon receiving a conditional request that includes both a Last-Modified date (e.g., in an If-Modified-Since |
---|
812 | or If-Unmodified-Since header field) and one or more entity tags (e.g., in an If-Match, If-None-Match, or If-Range header |
---|
813 | field) as cache validators, <em class="bcp14">MUST NOT</em> return a response status of 304 (Not Modified) unless doing so is consistent with all of the conditional header fields in |
---|
814 | the request. |
---|
815 | </p> |
---|
816 | <p id="rfc.section.5.p.7">An HTTP/1.1 caching proxy, upon receiving a conditional request that includes both a Last-Modified date and one or more entity |
---|
817 | tags as cache validators, <em class="bcp14">MUST NOT</em> return a locally cached response to the client unless that cached response is consistent with all of the conditional header |
---|
818 | fields in the request. |
---|
819 | </p> |
---|
820 | <dl class="empty"> |
---|
821 | <dd> <b>Note:</b> The general principle behind these rules is that HTTP/1.1 servers and clients should transmit as much non-redundant information |
---|
822 | as is available in their responses and requests. HTTP/1.1 systems receiving this information will make the most conservative |
---|
823 | assumptions about the validators they receive. |
---|
824 | </dd> |
---|
825 | <dd>HTTP/1.0 clients and caches will ignore entity tags. Generally, last-modified values received or used by these systems will |
---|
826 | support transparent and efficient caching, and so HTTP/1.1 origin servers should provide Last-Modified values. In those rare |
---|
827 | cases where the use of a Last-Modified value as a validator by an HTTP/1.0 system could result in a serious problem, then |
---|
828 | HTTP/1.1 origin servers should not provide one. |
---|
829 | </dd> |
---|
830 | </dl> |
---|
831 | <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="header.fields" href="#header.fields">Header Field Definitions</a></h1> |
---|
832 | <p id="rfc.section.6.p.1">This section defines the syntax and semantics of HTTP/1.1 header fields related to conditional requests.</p> |
---|
833 | <p id="rfc.section.6.p.2">For entity-header fields, both sender and recipient refer to either the client or the server, depending on who sends and who |
---|
834 | receives the entity. |
---|
835 | </p> |
---|
836 | <div id="rfc.iref.e.1"></div> |
---|
837 | <div id="rfc.iref.h.1"></div> |
---|
838 | <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="header.etag" href="#header.etag">ETag</a></h2> |
---|
839 | <p id="rfc.section.6.1.p.1">The response-header field "ETag" provides the current value of the entity tag (see <a href="#entity.tags" title="Entity Tags">Section 2</a>) for the requested variant. The headers used with entity tags are described in Sections <a href="#header.if-match" id="rfc.xref.header.if-match.2" title="If-Match">6.2</a> and <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.2" title="If-None-Match">6.4</a> of this document, and in <a href="p5-range.html#header.if-range" title="If-Range">Section 5.3</a> of <a href="#Part5" id="rfc.xref.Part5.4"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. The entity tag <em class="bcp14">MAY</em> be used for comparison with other entities from the same resource (see <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a>). |
---|
840 | </p> |
---|
841 | <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span> <a href="#header.etag" class="smpl">ETag</a> = "ETag" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.etag" class="smpl">ETag-v</a> |
---|
842 | <a href="#header.etag" class="smpl">ETag-v</a> = <a href="#entity.tags" class="smpl">entity-tag</a> |
---|
843 | </pre><div id="rfc.figure.u.5"></div> |
---|
844 | <p>Examples:</p> <pre class="text"> ETag: "xyzzy" |
---|
845 | ETag: W/"xyzzy" |
---|
846 | ETag: "" |
---|
847 | </pre><p id="rfc.section.6.1.p.4">The ETag response-header field value, an entity tag, provides for an "opaque" cache validator. This might allow more reliable |
---|
848 | validation in situations where it is inconvenient to store modification dates, where the one-second resolution of HTTP date |
---|
849 | values is not sufficient, or where the origin server wishes to avoid certain paradoxes that might arise from the use of modification |
---|
850 | dates. |
---|
851 | </p> |
---|
852 | <p id="rfc.section.6.1.p.5">The principle behind entity tags is that only the service author knows the semantics of a resource well enough to select an |
---|
853 | appropriate cache validation mechanism, and the specification of any validator comparison function more complex than byte-equality |
---|
854 | would open up a can of worms. Thus, comparisons of any other headers (except Last-Modified, for compatibility with HTTP/1.0) |
---|
855 | are never used for purposes of validating a cache entry. |
---|
856 | </p> |
---|
857 | <div id="rfc.iref.i.1"></div> |
---|
858 | <div id="rfc.iref.h.2"></div> |
---|
859 | <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> <a id="header.if-match" href="#header.if-match">If-Match</a></h2> |
---|
860 | <p id="rfc.section.6.2.p.1">The request-header field "If-Match" is used with a method to make it conditional. A client that has one or more entities previously |
---|
861 | obtained from the resource can verify that one of those entities is current by including a list of their associated entity |
---|
862 | tags in the If-Match header field. Entity tags are defined in <a href="#entity.tags" title="Entity Tags">Section 2</a>. The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. |
---|
863 | It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource. As a special |
---|
864 | case, the value "*" matches any current entity of the resource. |
---|
865 | </p> |
---|
866 | <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.6"></span><span id="rfc.iref.g.7"></span> <a href="#header.if-match" class="smpl">If-Match</a> = "If-Match" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-match" class="smpl">If-Match-v</a> |
---|
867 | <a href="#header.if-match" class="smpl">If-Match-v</a> = "*" / 1#<a href="#entity.tags" class="smpl">entity-tag</a> |
---|
868 | </pre><p id="rfc.section.6.2.p.3">If any of the entity tags match the entity tag of the entity that would have been returned in the response to a similar GET |
---|
869 | request (without the If-Match header) on that resource, or if "*" is given and any current entity exists for that resource, |
---|
870 | then the server <em class="bcp14">MAY</em> perform the requested method as if the If-Match header field did not exist. |
---|
871 | </p> |
---|
872 | <p id="rfc.section.6.2.p.4">A server <em class="bcp14">MUST</em> use the strong comparison function (see <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a>) to compare the entity tags in If-Match. |
---|
873 | </p> |
---|
874 | <p id="rfc.section.6.2.p.5">If none of the entity tags match, or if "*" is given and no current entity exists, the server <em class="bcp14">MUST NOT</em> perform the requested method, and <em class="bcp14">MUST</em> return a 412 (Precondition Failed) response. This behavior is most useful when the client wants to prevent an updating method, |
---|
875 | such as PUT, from modifying a resource that has changed since the client last retrieved it. |
---|
876 | </p> |
---|
877 | <p id="rfc.section.6.2.p.6">If the request would, without the If-Match header field, result in anything other than a 2xx or 412 status, then the If-Match |
---|
878 | header <em class="bcp14">MUST</em> be ignored. |
---|
879 | </p> |
---|
880 | <p id="rfc.section.6.2.p.7">The meaning of "If-Match: *" is that the method <em class="bcp14">SHOULD</em> be performed if the representation selected by the origin server (or by a cache, possibly using the Vary mechanism, see <a href="p6-cache.html#header.vary" title="Vary">Section 15.5</a> of <a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) exists, and <em class="bcp14">MUST NOT</em> be performed if the representation does not exist. |
---|
881 | </p> |
---|
882 | <p id="rfc.section.6.2.p.8">A request intended to update a resource (e.g., a PUT) <em class="bcp14">MAY</em> include an If-Match header field to signal that the request method <em class="bcp14">MUST NOT</em> be applied if the entity corresponding to the If-Match value (a single entity tag) is no longer a representation of that resource. |
---|
883 | This allows the user to indicate that they do not wish the request to be successful if the resource has been changed without |
---|
884 | their knowledge. Examples: |
---|
885 | </p> |
---|
886 | <div id="rfc.figure.u.7"></div><pre class="text"> If-Match: "xyzzy" |
---|
887 | If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" |
---|
888 | If-Match: * |
---|
889 | </pre><p id="rfc.section.6.2.p.10">The result of a request having both an If-Match header field and either an If-None-Match or an If-Modified-Since header fields |
---|
890 | is undefined by this specification. |
---|
891 | </p> |
---|
892 | <div id="rfc.iref.i.2"></div> |
---|
893 | <div id="rfc.iref.h.3"></div> |
---|
894 | <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> <a id="header.if-modified-since" href="#header.if-modified-since">If-Modified-Since</a></h2> |
---|
895 | <p id="rfc.section.6.3.p.1">The request-header field "If-Modified-Since" is used with a method to make it conditional: if the requested variant has not |
---|
896 | been modified since the time specified in this field, an entity will not be returned from the server; instead, a 304 (Not |
---|
897 | Modified) response will be returned without any message-body. |
---|
898 | </p> |
---|
899 | <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span> <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = "If-Modified-Since" ":" <a href="#core.rules" class="smpl">OWS</a> |
---|
900 | <a href="#header.if-modified-since" class="smpl">If-Modified-Since-v</a> |
---|
901 | <a href="#header.if-modified-since" class="smpl">If-Modified-Since-v</a> = <a href="#abnf.dependencies" class="smpl">HTTP-date</a> |
---|
902 | </pre><p id="rfc.section.6.3.p.3">An example of the field is:</p> |
---|
903 | <div id="rfc.figure.u.9"></div><pre class="text"> If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT |
---|
904 | </pre><p id="rfc.section.6.3.p.5">A GET method with an If-Modified-Since header and no Range header requests that the identified entity be transferred only |
---|
905 | if it has been modified since the date given by the If-Modified-Since header. The algorithm for determining this includes |
---|
906 | the following cases: |
---|
907 | </p> |
---|
908 | <ol> |
---|
909 | <li>If the request would normally result in anything other than a 200 (OK) status, or if the passed If-Modified-Since date is |
---|
910 | invalid, the response is exactly the same as for a normal GET. A date which is later than the server's current time is invalid. |
---|
911 | </li> |
---|
912 | <li>If the variant has been modified since the If-Modified-Since date, the response is exactly the same as for a normal GET.</li> |
---|
913 | <li>If the variant has not been modified since a valid If-Modified-Since date, the server <em class="bcp14">SHOULD</em> return a 304 (Not Modified) response. |
---|
914 | </li> |
---|
915 | </ol> |
---|
916 | <p id="rfc.section.6.3.p.6">The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. </p> |
---|
917 | <dl class="empty"> |
---|
918 | <dd> <b>Note:</b> The Range request-header field modifies the meaning of If-Modified-Since; see <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.5"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a> for full details. |
---|
919 | </dd> |
---|
920 | <dd> <b>Note:</b> If-Modified-Since times are interpreted by the server, whose clock might not be synchronized with the client. |
---|
921 | </dd> |
---|
922 | <dd> <b>Note:</b> When handling an If-Modified-Since header field, some servers will use an exact date comparison function, rather than a less-than |
---|
923 | function, for deciding whether to send a 304 (Not Modified) response. To get best results when sending an If-Modified-Since |
---|
924 | header field for cache validation, clients are advised to use the exact date string received in a previous Last-Modified header |
---|
925 | field whenever possible. |
---|
926 | </dd> |
---|
927 | <dd> <b>Note:</b> If a client uses an arbitrary date in the If-Modified-Since header instead of a date taken from the Last-Modified header for |
---|
928 | the same request, the client should be aware of the fact that this date is interpreted in the server's understanding of time. |
---|
929 | The client should consider unsynchronized clocks and rounding problems due to the different encodings of time between the |
---|
930 | client and server. This includes the possibility of race conditions if the document has changed between the time it was first |
---|
931 | requested and the If-Modified-Since date of a subsequent request, and the possibility of clock-skew-related problems if the |
---|
932 | If-Modified-Since date is derived from the client's clock without correction to the server's clock. Corrections for different |
---|
933 | time bases between client and server are at best approximate due to network latency. |
---|
934 | </dd> |
---|
935 | </dl> |
---|
936 | <p id="rfc.section.6.3.p.7">The result of a request having both an If-Modified-Since header field and either an If-Match or an If-Unmodified-Since header |
---|
937 | fields is undefined by this specification. |
---|
938 | </p> |
---|
939 | <div id="rfc.iref.i.3"></div> |
---|
940 | <div id="rfc.iref.h.4"></div> |
---|
941 | <h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a> <a id="header.if-none-match" href="#header.if-none-match">If-None-Match</a></h2> |
---|
942 | <p id="rfc.section.6.4.p.1">The request-header field "If-None-Match" is used with a method to make it conditional. A client that has one or more entities |
---|
943 | previously obtained from the resource can verify that none of those entities is current by including a list of their associated |
---|
944 | entity tags in the If-None-Match header field. The purpose of this feature is to allow efficient updates of cached information |
---|
945 | with a minimum amount of transaction overhead. It is also used to prevent a method (e.g. PUT) from inadvertently modifying |
---|
946 | an existing resource when the client believes that the resource does not exist. |
---|
947 | </p> |
---|
948 | <p id="rfc.section.6.4.p.2">As a special case, the value "*" matches any current entity of the resource.</p> |
---|
949 | <div id="rfc.figure.u.10"></div><pre class="inline"><span id="rfc.iref.g.10"></span><span id="rfc.iref.g.11"></span> <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "If-None-Match" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.if-none-match" class="smpl">If-None-Match-v</a> |
---|
950 | <a href="#header.if-none-match" class="smpl">If-None-Match-v</a> = "*" / 1#<a href="#entity.tags" class="smpl">entity-tag</a> |
---|
951 | </pre><p id="rfc.section.6.4.p.4">If any of the entity tags match the entity tag of the entity that would have been returned in the response to a similar GET |
---|
952 | request (without the If-None-Match header) on that resource, or if "*" is given and any current entity exists for that resource, |
---|
953 | then the server <em class="bcp14">MUST NOT</em> perform the requested method, unless required to do so because the resource's modification date fails to match that supplied |
---|
954 | in an If-Modified-Since header field in the request. Instead, if the request method was GET or HEAD, the server <em class="bcp14">SHOULD</em> respond with a 304 (Not Modified) response, including the cache-related header fields (particularly ETag) of one of the entities |
---|
955 | that matched. For all other request methods, the server <em class="bcp14">MUST</em> respond with a status of 412 (Precondition Failed). |
---|
956 | </p> |
---|
957 | <p id="rfc.section.6.4.p.5">See <a href="#weak.and.strong.validators" title="Weak and Strong Validators">Section 4</a> for rules on how to determine if two entity tags match. |
---|
958 | </p> |
---|
959 | <p id="rfc.section.6.4.p.6">If none of the entity tags match, then the server <em class="bcp14">MAY</em> perform the requested method as if the If-None-Match header field did not exist, but <em class="bcp14">MUST</em> also ignore any If-Modified-Since header field(s) in the request. That is, if no entity tags match, then the server <em class="bcp14">MUST NOT</em> return a 304 (Not Modified) response. |
---|
960 | </p> |
---|
961 | <p id="rfc.section.6.4.p.7">If the request would, without the If-None-Match header field, result in anything other than a 2xx or 304 status, then the |
---|
962 | If-None-Match header <em class="bcp14">MUST</em> be ignored. (See <a href="#rules.for.when.to.use.entity.tags.and.last-modified.dates" title="Rules for When to Use Entity Tags and Last-Modified Dates">Section 5</a> for a discussion of server behavior when both If-Modified-Since and If-None-Match appear in the same request.) |
---|
963 | </p> |
---|
964 | <p id="rfc.section.6.4.p.8">The meaning of "If-None-Match: *" is that the method <em class="bcp14">MUST NOT</em> be performed if the representation selected by the origin server (or by a cache, possibly using the Vary mechanism, see <a href="p6-cache.html#header.vary" title="Vary">Section 15.5</a> of <a href="#Part6" id="rfc.xref.Part6.3"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) exists, and <em class="bcp14">SHOULD</em> be performed if the representation does not exist. This feature is intended to be useful in preventing races between PUT operations. |
---|
965 | </p> |
---|
966 | <p id="rfc.section.6.4.p.9">Examples:</p> |
---|
967 | <div id="rfc.figure.u.11"></div><pre class="text"> If-None-Match: "xyzzy" |
---|
968 | If-None-Match: W/"xyzzy" |
---|
969 | If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" |
---|
970 | If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz" |
---|
971 | If-None-Match: * |
---|
972 | </pre><p id="rfc.section.6.4.p.11">The result of a request having both an If-None-Match header field and either an If-Match or an If-Unmodified-Since header |
---|
973 | fields is undefined by this specification. |
---|
974 | </p> |
---|
975 | <div id="rfc.iref.i.4"></div> |
---|
976 | <div id="rfc.iref.h.5"></div> |
---|
977 | <h2 id="rfc.section.6.5"><a href="#rfc.section.6.5">6.5</a> <a id="header.if-unmodified-since" href="#header.if-unmodified-since">If-Unmodified-Since</a></h2> |
---|
978 | <p id="rfc.section.6.5.p.1">The request-header field "If-Unmodified-Since" is used with a method to make it conditional. If the requested resource has |
---|
979 | not been modified since the time specified in this field, the server <em class="bcp14">SHOULD</em> perform the requested operation as if the If-Unmodified-Since header were not present. |
---|
980 | </p> |
---|
981 | <p id="rfc.section.6.5.p.2">If the requested variant has been modified since the specified time, the server <em class="bcp14">MUST NOT</em> perform the requested operation, and <em class="bcp14">MUST</em> return a 412 (Precondition Failed). |
---|
982 | </p> |
---|
983 | <div id="rfc.figure.u.12"></div><pre class="inline"><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span> <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = "If-Unmodified-Since" ":" <a href="#core.rules" class="smpl">OWS</a> |
---|
984 | <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since-v</a> |
---|
985 | <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since-v</a> = <a href="#abnf.dependencies" class="smpl">HTTP-date</a> |
---|
986 | </pre><p id="rfc.section.6.5.p.4">An example of the field is:</p> |
---|
987 | <div id="rfc.figure.u.13"></div><pre class="text"> If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT |
---|
988 | </pre><p id="rfc.section.6.5.p.6">If the request normally (i.e., without the If-Unmodified-Since header) would result in anything other than a 2xx or 412 status, |
---|
989 | the If-Unmodified-Since header <em class="bcp14">SHOULD</em> be ignored. |
---|
990 | </p> |
---|
991 | <p id="rfc.section.6.5.p.7">If the specified date is invalid, the header is ignored.</p> |
---|
992 | <p id="rfc.section.6.5.p.8">The result of a request having both an If-Unmodified-Since header field and either an If-None-Match or an If-Modified-Since |
---|
993 | header fields is undefined by this specification. |
---|
994 | </p> |
---|
995 | <div id="rfc.iref.l.1"></div> |
---|
996 | <div id="rfc.iref.h.6"></div> |
---|
997 | <h2 id="rfc.section.6.6"><a href="#rfc.section.6.6">6.6</a> <a id="header.last-modified" href="#header.last-modified">Last-Modified</a></h2> |
---|
998 | <p id="rfc.section.6.6.p.1">The entity-header field "Last-Modified" indicates the date and time at which the origin server believes the variant was last |
---|
999 | modified. |
---|
1000 | </p> |
---|
1001 | <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.14"></span><span id="rfc.iref.g.15"></span> <a href="#header.last-modified" class="smpl">Last-Modified</a> = "Last-Modified" ":" <a href="#core.rules" class="smpl">OWS</a> <a href="#header.last-modified" class="smpl">Last-Modified-v</a> |
---|
1002 | <a href="#header.last-modified" class="smpl">Last-Modified-v</a> = <a href="#abnf.dependencies" class="smpl">HTTP-date</a> |
---|
1003 | </pre><p id="rfc.section.6.6.p.3">An example of its use is</p> |
---|
1004 | <div id="rfc.figure.u.15"></div><pre class="text"> Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT |
---|
1005 | </pre><p id="rfc.section.6.6.p.5">The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. |
---|
1006 | For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the |
---|
1007 | most recent of the set of last-modify times for its component parts. For database gateways, it may be the last-update time |
---|
1008 | stamp of the record. For virtual objects, it may be the last time the internal state changed. |
---|
1009 | </p> |
---|
1010 | <p id="rfc.section.6.6.p.6">An origin server <em class="bcp14">MUST NOT</em> send a Last-Modified date which is later than the server's time of message origination. In such cases, where the resource's |
---|
1011 | last modification would indicate some time in the future, the server <em class="bcp14">MUST</em> replace that date with the message origination date. |
---|
1012 | </p> |
---|
1013 | <p id="rfc.section.6.6.p.7">An origin server <em class="bcp14">SHOULD</em> obtain the Last-Modified value of the entity as close as possible to the time that it generates the Date value of its response. |
---|
1014 | This allows a recipient to make an accurate assessment of the entity's modification time, especially if the entity changes |
---|
1015 | near the time that the response is generated. |
---|
1016 | </p> |
---|
1017 | <p id="rfc.section.6.6.p.8">HTTP/1.1 servers <em class="bcp14">SHOULD</em> send Last-Modified whenever feasible. |
---|
1018 | </p> |
---|
1019 | <p id="rfc.section.6.6.p.9">The Last-Modified entity-header field value is often used as a cache validator. In simple terms, a cache entry is considered |
---|
1020 | to be valid if the entity has not been modified since the Last-Modified value. |
---|
1021 | </p> |
---|
1022 | <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1> |
---|
1023 | <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> <a id="message.header.registration" href="#message.header.registration">Message Header Registration</a></h2> |
---|
1024 | <p id="rfc.section.7.1.p.1">The Message Header Registry located at <<a href="http://www.iana.org/assignments/message-headers/message-header-index.html">http://www.iana.org/assignments/message-headers/message-header-index.html</a>> should be updated with the permanent registrations below (see <a href="#RFC3864" id="rfc.xref.RFC3864.1"><cite title="Registration Procedures for Message Header Fields">[RFC3864]</cite></a>): |
---|
1025 | </p> |
---|
1026 | <div id="rfc.table.1"> |
---|
1027 | <div id="iana.header.registration.table"></div> |
---|
1028 | <table summary="" class="tt full" cellpadding="3" cellspacing="0"> |
---|
1029 | <thead> |
---|
1030 | <tr> |
---|
1031 | <th>Header Field Name</th> |
---|
1032 | <th>Protocol</th> |
---|
1033 | <th>Status</th> |
---|
1034 | <th>Reference</th> |
---|
1035 | </tr> |
---|
1036 | </thead> |
---|
1037 | <tbody> |
---|
1038 | <tr> |
---|
1039 | <td>ETag</td> |
---|
1040 | <td>http</td> |
---|
1041 | <td>standard</td> |
---|
1042 | <td> <a href="#header.etag" id="rfc.xref.header.etag.2" title="ETag">Section 6.1</a> |
---|
1043 | </td> |
---|
1044 | </tr> |
---|
1045 | <tr> |
---|
1046 | <td>If-Match</td> |
---|
1047 | <td>http</td> |
---|
1048 | <td>standard</td> |
---|
1049 | <td> <a href="#header.if-match" id="rfc.xref.header.if-match.3" title="If-Match">Section 6.2</a> |
---|
1050 | </td> |
---|
1051 | </tr> |
---|
1052 | <tr> |
---|
1053 | <td>If-Modified-Since</td> |
---|
1054 | <td>http</td> |
---|
1055 | <td>standard</td> |
---|
1056 | <td> <a href="#header.if-modified-since" id="rfc.xref.header.if-modified-since.1" title="If-Modified-Since">Section 6.3</a> |
---|
1057 | </td> |
---|
1058 | </tr> |
---|
1059 | <tr> |
---|
1060 | <td>If-None-Match</td> |
---|
1061 | <td>http</td> |
---|
1062 | <td>standard</td> |
---|
1063 | <td> <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.3" title="If-None-Match">Section 6.4</a> |
---|
1064 | </td> |
---|
1065 | </tr> |
---|
1066 | <tr> |
---|
1067 | <td>If-Unmodified-Since</td> |
---|
1068 | <td>http</td> |
---|
1069 | <td>standard</td> |
---|
1070 | <td> <a href="#header.if-unmodified-since" id="rfc.xref.header.if-unmodified-since.1" title="If-Unmodified-Since">Section 6.5</a> |
---|
1071 | </td> |
---|
1072 | </tr> |
---|
1073 | <tr> |
---|
1074 | <td>Last-Modified</td> |
---|
1075 | <td>http</td> |
---|
1076 | <td>standard</td> |
---|
1077 | <td> <a href="#header.last-modified" id="rfc.xref.header.last-modified.1" title="Last-Modified">Section 6.6</a> |
---|
1078 | </td> |
---|
1079 | </tr> |
---|
1080 | </tbody> |
---|
1081 | </table> |
---|
1082 | </div> |
---|
1083 | <p id="rfc.section.7.1.p.2">The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".</p> |
---|
1084 | <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a> <a id="security.considerations" href="#security.considerations">Security Considerations</a></h1> |
---|
1085 | <p id="rfc.section.8.p.1">No additional security considerations have been identified beyond those applicable to HTTP in general <a href="#Part1" id="rfc.xref.Part1.8"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. |
---|
1086 | </p> |
---|
1087 | <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a> <a id="ack" href="#ack">Acknowledgments</a></h1> |
---|
1088 | <h1 id="rfc.references"><a id="rfc.section.10" href="#rfc.section.10">10.</a> References |
---|
1089 | </h1> |
---|
1090 | <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References |
---|
1091 | </h2> |
---|
1092 | <table summary="Normative References"> |
---|
1093 | <tr> |
---|
1094 | <td class="reference"><b id="Part1">[Part1]</b></td> |
---|
1095 | <td class="top"><a title="Day Software">Fielding, R., Ed.</a>, <a title="One Laptop per Child">Gettys, J.</a>, <a title="Hewlett-Packard Company">Mogul, J.</a>, <a title="Microsoft Corporation">Frystyk, H.</a>, <a title="Adobe Systems, Incorporated">Masinter, L.</a>, <a title="Microsoft Corporation">Leach, P.</a>, <a title="World Wide Web Consortium">Berners-Lee, T.</a>, <a title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a title="greenbytes GmbH">J. F. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-latest">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</a>”, Internet-Draft draft-ietf-httpbis-p1-messaging-latest (work in progress), February 2009. |
---|
1096 | </td> |
---|
1097 | </tr> |
---|
1098 | <tr> |
---|
1099 | <td class="reference"><b id="Part5">[Part5]</b></td> |
---|
1100 | <td class="top"><a title="Day Software">Fielding, R., Ed.</a>, <a title="One Laptop per Child">Gettys, J.</a>, <a title="Hewlett-Packard Company">Mogul, J.</a>, <a title="Microsoft Corporation">Frystyk, H.</a>, <a title="Adobe Systems, Incorporated">Masinter, L.</a>, <a title="Microsoft Corporation">Leach, P.</a>, <a title="World Wide Web Consortium">Berners-Lee, T.</a>, <a title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a title="greenbytes GmbH">J. F. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-latest">HTTP/1.1, part 5: Range Requests and Partial Responses</a>”, Internet-Draft draft-ietf-httpbis-p5-range-latest (work in progress), February 2009. |
---|
1101 | </td> |
---|
1102 | </tr> |
---|
1103 | <tr> |
---|
1104 | <td class="reference"><b id="Part6">[Part6]</b></td> |
---|
1105 | <td class="top"><a title="Day Software">Fielding, R., Ed.</a>, <a title="One Laptop per Child">Gettys, J.</a>, <a title="Hewlett-Packard Company">Mogul, J.</a>, <a title="Microsoft Corporation">Frystyk, H.</a>, <a title="Adobe Systems, Incorporated">Masinter, L.</a>, <a title="Microsoft Corporation">Leach, P.</a>, <a title="World Wide Web Consortium">Berners-Lee, T.</a>, <a title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a title="greenbytes GmbH">J. F. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-latest">HTTP/1.1, part 6: Caching</a>”, Internet-Draft draft-ietf-httpbis-p6-cache-latest (work in progress), February 2009. |
---|
1106 | </td> |
---|
1107 | </tr> |
---|
1108 | <tr> |
---|
1109 | <td class="reference"><b id="RFC2119">[RFC2119]</b></td> |
---|
1110 | <td class="top"><a title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP 14, RFC 2119, March 1997. |
---|
1111 | </td> |
---|
1112 | </tr> |
---|
1113 | <tr> |
---|
1114 | <td class="reference"><b id="RFC5234">[RFC5234]</b></td> |
---|
1115 | <td class="top"><a title="Brandenburg InternetWorking">Crocker, D., Ed.</a> and <a title="THUS plc.">P. Overell</a>, “<a href="http://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>”, STD 68, RFC 5234, January 2008. |
---|
1116 | </td> |
---|
1117 | </tr> |
---|
1118 | </table> |
---|
1119 | <h2 id="rfc.references.2"><a href="#rfc.section.10.2" id="rfc.section.10.2">10.2</a> Informative References |
---|
1120 | </h2> |
---|
1121 | <table summary="Informative References"> |
---|
1122 | <tr> |
---|
1123 | <td class="reference"><b id="RFC2616">[RFC2616]</b></td> |
---|
1124 | <td class="top"><a title="University of California, Irvine">Fielding, R.</a>, <a title="W3C">Gettys, J.</a>, <a title="Compaq Computer Corporation">Mogul, J.</a>, <a title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a title="Xerox Corporation">Masinter, L.</a>, <a title="Microsoft Corporation">Leach, P.</a>, and <a title="W3C">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC 2616, June 1999. |
---|
1125 | </td> |
---|
1126 | </tr> |
---|
1127 | <tr> |
---|
1128 | <td class="reference"><b id="RFC3864">[RFC3864]</b></td> |
---|
1129 | <td class="top"><a title="Nine by Nine">Klyne, G.</a>, <a title="BEA Systems">Nottingham, M.</a>, and <a title="HP Labs">J. Mogul</a>, “<a href="http://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>”, BCP 90, RFC 3864, September 2004. |
---|
1130 | </td> |
---|
1131 | </tr> |
---|
1132 | </table> |
---|
1133 | <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1> |
---|
1134 | <address class="vcard"><span class="vcardline"><span class="fn">Roy T. Fielding</span> |
---|
1135 | (editor) |
---|
1136 | <span class="n hidden"><span class="family-name">Fielding</span><span class="given-name">Roy T.</span></span></span><span class="org vcardline">Day Software</span><span class="adr"><span class="street-address vcardline">23 Corporate Plaza DR, Suite 280</span><span class="vcardline"><span class="locality">Newport Beach</span>, <span class="region">CA</span> <span class="postal-code">92660</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline tel">Phone: <a href="tel:+1-949-706-5300"><span class="value">+1-949-706-5300</span></a></span><span class="vcardline tel"><span class="type">Fax</span>: <a href="fax:+1-949-706-5305"><span class="value">+1-949-706-5305</span></a></span><span class="vcardline">EMail: <a><span class="email">fielding@gbiv.com</span></a></span><span class="vcardline">URI: <a href="http://roy.gbiv.com/" class="url">http://roy.gbiv.com/</a></span></address> |
---|
1137 | <address class="vcard"><span class="vcardline"><span class="fn">Jim Gettys</span><span class="n hidden"><span class="family-name">Gettys</span><span class="given-name">Jim</span></span></span><span class="org vcardline">One Laptop per Child</span><span class="adr"><span class="street-address vcardline">21 Oak Knoll Road</span><span class="vcardline"><span class="locality">Carlisle</span>, <span class="region">MA</span> <span class="postal-code">01741</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a><span class="email">jg@laptop.org</span></a></span><span class="vcardline">URI: <a href="http://www.laptop.org/" class="url">http://www.laptop.org/</a></span></address> |
---|
1138 | <address class="vcard"><span class="vcardline"><span class="fn">Jeffrey C. Mogul</span><span class="n hidden"><span class="family-name">Mogul</span><span class="given-name">Jeffrey C.</span></span></span><span class="org vcardline">Hewlett-Packard Company</span><span class="adr"><span class="street-address vcardline">HP Labs, Large Scale Systems Group</span><span class="street-address vcardline">1501 Page Mill Road, MS 1177</span><span class="vcardline"><span class="locality">Palo Alto</span>, <span class="region">CA</span> <span class="postal-code">94304</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a><span class="email">JeffMogul@acm.org</span></a></span></address> |
---|
1139 | <address class="vcard"><span class="vcardline"><span class="fn">Henrik Frystyk Nielsen</span><span class="n hidden"><span class="family-name">Frystyk</span></span></span><span class="org vcardline">Microsoft Corporation</span><span class="adr"><span class="street-address vcardline">1 Microsoft Way</span><span class="vcardline"><span class="locality">Redmond</span>, <span class="region">WA</span> <span class="postal-code">98052</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a><span class="email">henrikn@microsoft.com</span></a></span></address> |
---|
1140 | <address class="vcard"><span class="vcardline"><span class="fn">Larry Masinter</span><span class="n hidden"><span class="family-name">Masinter</span><span class="given-name">Larry</span></span></span><span class="org vcardline">Adobe Systems, Incorporated</span><span class="adr"><span class="street-address vcardline">345 Park Ave</span><span class="vcardline"><span class="locality">San Jose</span>, <span class="region">CA</span> <span class="postal-code">95110</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a><span class="email">LMM@acm.org</span></a></span><span class="vcardline">URI: <a href="http://larry.masinter.net/" class="url">http://larry.masinter.net/</a></span></address> |
---|
1141 | <address class="vcard"><span class="vcardline"><span class="fn">Paul J. Leach</span><span class="n hidden"><span class="family-name">Leach</span><span class="given-name">Paul J.</span></span></span><span class="org vcardline">Microsoft Corporation</span><span class="adr"><span class="street-address vcardline">1 Microsoft Way</span><span class="vcardline"><span class="locality">Redmond</span>, <span class="region">WA</span> <span class="postal-code">98052</span></span></span><span class="vcardline">EMail: <a><span class="email">paulle@microsoft.com</span></a></span></address> |
---|
1142 | <address class="vcard"><span class="vcardline"><span class="fn">Tim Berners-Lee</span><span class="n hidden"><span class="family-name">Berners-Lee</span><span class="given-name">Tim</span></span></span><span class="org vcardline">World Wide Web Consortium</span><span class="adr"><span class="street-address vcardline">MIT Computer Science and Artificial Intelligence Laboratory</span><span class="street-address vcardline">The Stata Center, Building 32</span><span class="street-address vcardline">32 Vassar Street</span><span class="vcardline"><span class="locality">Cambridge</span>, <span class="region">MA</span> <span class="postal-code">02139</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">EMail: <a><span class="email">timbl@w3.org</span></a></span><span class="vcardline">URI: <a href="http://www.w3.org/People/Berners-Lee/" class="url">http://www.w3.org/People/Berners-Lee/</a></span></address> |
---|
1143 | <address class="vcard"><span class="vcardline"><span class="fn">Yves Lafon</span> |
---|
1144 | (editor) |
---|
1145 | <span class="n hidden"><span class="family-name">Lafon</span><span class="given-name">Yves</span></span></span><span class="org vcardline">World Wide Web Consortium</span><span class="adr"><span class="street-address vcardline">W3C / ERCIM</span><span class="street-address vcardline">2004, rte des Lucioles</span><span class="vcardline"><span class="locality">Sophia-Antipolis</span>, <span class="region">AM</span> <span class="postal-code">06902</span></span><span class="country-name vcardline">France</span></span><span class="vcardline">EMail: <a><span class="email">ylafon@w3.org</span></a></span><span class="vcardline">URI: <a href="http://www.raubacapeu.net/people/yves/" class="url">http://www.raubacapeu.net/people/yves/</a></span></address> |
---|
1146 | <address class="vcard"><span class="vcardline"><span class="fn">Julian F. Reschke</span> |
---|
1147 | (editor) |
---|
1148 | <span class="n hidden"><span class="family-name">Reschke</span><span class="given-name">Julian F.</span></span></span><span class="org vcardline">greenbytes GmbH</span><span class="adr"><span class="street-address vcardline">Hafenweg 16</span><span class="vcardline"><span class="locality">Muenster</span>, <span class="region">NW</span> <span class="postal-code">48155</span></span><span class="country-name vcardline">Germany</span></span><span class="vcardline tel">Phone: <a href="tel:+492512807760"><span class="value">+49 251 2807760</span></a></span><span class="vcardline tel"><span class="type">Fax</span>: <a href="fax:+492512807761"><span class="value">+49 251 2807761</span></a></span><span class="vcardline">EMail: <a><span class="email">julian.reschke@greenbytes.de</span></a></span><span class="vcardline">URI: <a href="http://greenbytes.de/tech/webdav/" class="url">http://greenbytes.de/tech/webdav/</a></span></address> |
---|
1149 | <h1 id="rfc.section.A"><a href="#rfc.section.A">A.</a> <a id="compatibility" href="#compatibility">Compatibility with Previous Versions</a></h1> |
---|
1150 | <h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a> <a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2> |
---|
1151 | <p id="rfc.section.A.1.p.1">Allow weak entity tags in all requests except range requests (Sections <a href="#weak.and.strong.validators" title="Weak and Strong Validators">4</a> and <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.4" title="If-None-Match">6.4</a>). |
---|
1152 | </p> |
---|
1153 | <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a> <a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1> |
---|
1154 | <div id="rfc.figure.u.16"></div> <pre class="inline"><a href="#header.etag" class="smpl">ETag</a> = "ETag:" OWS ETag-v |
---|
1155 | <a href="#header.etag" class="smpl">ETag-v</a> = entity-tag |
---|
1156 | |
---|
1157 | <a href="#abnf.dependencies" class="smpl">HTTP-date</a> = <HTTP-date, defined in [Part1], Section 3.2.1> |
---|
1158 | |
---|
1159 | <a href="#header.if-match" class="smpl">If-Match</a> = "If-Match:" OWS If-Match-v |
---|
1160 | <a href="#header.if-match" class="smpl">If-Match-v</a> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS |
---|
1161 | entity-tag ] ) ) |
---|
1162 | <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = "If-Modified-Since:" OWS If-Modified-Since-v |
---|
1163 | <a href="#header.if-modified-since" class="smpl">If-Modified-Since-v</a> = HTTP-date |
---|
1164 | <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "If-None-Match:" OWS If-None-Match-v |
---|
1165 | <a href="#header.if-none-match" class="smpl">If-None-Match-v</a> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS |
---|
1166 | entity-tag ] ) ) |
---|
1167 | <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = "If-Unmodified-Since:" OWS |
---|
1168 | If-Unmodified-Since-v |
---|
1169 | <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since-v</a> = HTTP-date |
---|
1170 | |
---|
1171 | <a href="#header.last-modified" class="smpl">Last-Modified</a> = "Last-Modified:" OWS Last-Modified-v |
---|
1172 | <a href="#header.last-modified" class="smpl">Last-Modified-v</a> = HTTP-date |
---|
1173 | |
---|
1174 | <a href="#core.rules" class="smpl">OWS</a> = <OWS, defined in [Part1], Section 1.2.2> |
---|
1175 | |
---|
1176 | <a href="#entity.tags" class="smpl">entity-tag</a> = [ weak ] opaque-tag |
---|
1177 | |
---|
1178 | <a href="#entity.tags" class="smpl">opaque-tag</a> = quoted-string |
---|
1179 | |
---|
1180 | <a href="#core.rules" class="smpl">quoted-string</a> = <quoted-string, defined in [Part1], Section 1.2.2> |
---|
1181 | |
---|
1182 | <a href="#entity.tags" class="smpl">weak</a> = "W/" |
---|
1183 | |
---|
1184 | |
---|
1185 | </pre> <div id="rfc.figure.u.17"></div> |
---|
1186 | <p>ABNF diagnostics:</p><pre class="inline">; ETag defined but not used |
---|
1187 | ; If-Match defined but not used |
---|
1188 | ; If-Modified-Since defined but not used |
---|
1189 | ; If-None-Match defined but not used |
---|
1190 | ; If-Unmodified-Since defined but not used |
---|
1191 | ; Last-Modified defined but not used |
---|
1192 | </pre><h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a> <a id="change.log" href="#change.log">Change Log (to be removed by RFC Editor before publication)</a></h1> |
---|
1193 | <h2 id="rfc.section.C.1"><a href="#rfc.section.C.1">C.1</a> Since RFC2616 |
---|
1194 | </h2> |
---|
1195 | <p id="rfc.section.C.1.p.1">Extracted relevant partitions from <a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. |
---|
1196 | </p> |
---|
1197 | <h2 id="rfc.section.C.2"><a href="#rfc.section.C.2">C.2</a> Since draft-ietf-httpbis-p4-conditional-00 |
---|
1198 | </h2> |
---|
1199 | <p id="rfc.section.C.2.p.1">Closed issues: </p> |
---|
1200 | <ul> |
---|
1201 | <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/35">http://tools.ietf.org/wg/httpbis/trac/ticket/35</a>>: "Normative and Informative references" |
---|
1202 | </li> |
---|
1203 | </ul> |
---|
1204 | <p id="rfc.section.C.2.p.2">Other changes: </p> |
---|
1205 | <ul> |
---|
1206 | <li>Move definitions of 304 and 412 condition codes from Part2.</li> |
---|
1207 | </ul> |
---|
1208 | <h2 id="rfc.section.C.3"><a href="#rfc.section.C.3">C.3</a> Since draft-ietf-httpbis-p4-conditional-01 |
---|
1209 | </h2> |
---|
1210 | <p id="rfc.section.C.3.p.1">Ongoing work on ABNF conversion (<<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>>): |
---|
1211 | </p> |
---|
1212 | <ul> |
---|
1213 | <li>Add explicit references to BNF syntax and rules imported from other parts of the specification.</li> |
---|
1214 | </ul> |
---|
1215 | <h2 id="rfc.section.C.4"><a href="#rfc.section.C.4">C.4</a> <a id="changes.since.02" href="#changes.since.02">Since draft-ietf-httpbis-p4-conditional-02</a></h2> |
---|
1216 | <p id="rfc.section.C.4.p.1">Closed issues: </p> |
---|
1217 | <ul> |
---|
1218 | <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/116">http://tools.ietf.org/wg/httpbis/trac/ticket/116</a>>: "Weak ETags on non-GET requests" |
---|
1219 | </li> |
---|
1220 | </ul> |
---|
1221 | <p id="rfc.section.C.4.p.2">Ongoing work on IANA Message Header Registration (<<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/40">http://tools.ietf.org/wg/httpbis/trac/ticket/40</a>>): |
---|
1222 | </p> |
---|
1223 | <ul> |
---|
1224 | <li>Reference RFC 3984, and update header registrations for headers defined in this document.</li> |
---|
1225 | </ul> |
---|
1226 | <h2 id="rfc.section.C.5"><a href="#rfc.section.C.5">C.5</a> <a id="changes.since.03" href="#changes.since.03">Since draft-ietf-httpbis-p4-conditional-03</a></h2> |
---|
1227 | <p id="rfc.section.C.5.p.1">Closed issues: </p> |
---|
1228 | <ul> |
---|
1229 | <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/71">http://tools.ietf.org/wg/httpbis/trac/ticket/71</a>>: "Examples for ETag matching" |
---|
1230 | </li> |
---|
1231 | <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/124">http://tools.ietf.org/wg/httpbis/trac/ticket/124</a>>: "'entity value' undefined" |
---|
1232 | </li> |
---|
1233 | <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/126">http://tools.ietf.org/wg/httpbis/trac/ticket/126</a>>: "bogus 2068 Date header reference" |
---|
1234 | </li> |
---|
1235 | </ul> |
---|
1236 | <h2 id="rfc.section.C.6"><a href="#rfc.section.C.6">C.6</a> <a id="changes.since.04" href="#changes.since.04">Since draft-ietf-httpbis-p4-conditional-04</a></h2> |
---|
1237 | <p id="rfc.section.C.6.p.1">Ongoing work on ABNF conversion (<<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>>): |
---|
1238 | </p> |
---|
1239 | <ul> |
---|
1240 | <li>Use "/" instead of "|" for alternatives.</li> |
---|
1241 | <li>Introduce new ABNF rules for "bad" whitespace ("BWS"), optional whitespace ("OWS") and required whitespace ("RWS").</li> |
---|
1242 | <li>Rewrite ABNFs to spell out whitespace rules, factor out header value format definitions.</li> |
---|
1243 | </ul> |
---|
1244 | <h2 id="rfc.section.C.7"><a href="#rfc.section.C.7">C.7</a> <a id="changes.since.05" href="#changes.since.05">Since draft-ietf-httpbis-p4-conditional-05</a></h2> |
---|
1245 | <p id="rfc.section.C.7.p.1">Ongoing work on ABNF conversion (<<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>>): |
---|
1246 | </p> |
---|
1247 | <ul> |
---|
1248 | <li>Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.</li> |
---|
1249 | </ul> |
---|
1250 | <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1> |
---|
1251 | <p class="noprint"><a href="#rfc.index.3">3</a> <a href="#rfc.index.4">4</a> <a href="#rfc.index.E">E</a> <a href="#rfc.index.G">G</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.I">I</a> <a href="#rfc.index.L">L</a> <a href="#rfc.index.P">P</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.S">S</a> |
---|
1252 | </p> |
---|
1253 | <div class="print2col"> |
---|
1254 | <ul class="ind"> |
---|
1255 | <li class="indline0"><a id="rfc.index.3" href="#rfc.index.3"><b>3</b></a><ul class="ind"> |
---|
1256 | <li class="indline1">304 Not Modified (status code) <a class="iref" href="#rfc.iref.3"><b>3.1</b></a></li> |
---|
1257 | </ul> |
---|
1258 | </li> |
---|
1259 | <li class="indline0"><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul class="ind"> |
---|
1260 | <li class="indline1">412 Precondition Failed (status code) <a class="iref" href="#rfc.iref.4"><b>3.2</b></a></li> |
---|
1261 | </ul> |
---|
1262 | </li> |
---|
1263 | <li class="indline0"><a id="rfc.index.E" href="#rfc.index.E"><b>E</b></a><ul class="ind"> |
---|
1264 | <li class="indline1">ETag header <a class="iref" href="#rfc.xref.header.etag.1">2</a>, <a class="iref" href="#rfc.iref.e.1"><b>6.1</b></a>, <a class="iref" href="#rfc.xref.header.etag.2">7.1</a></li> |
---|
1265 | </ul> |
---|
1266 | </li> |
---|
1267 | <li class="indline0"><a id="rfc.index.G" href="#rfc.index.G"><b>G</b></a><ul class="ind"> |
---|
1268 | <li class="indline1"><tt>Grammar</tt> |
---|
1269 | <ul class="ind"> |
---|
1270 | <li class="indline1"><tt>entity-tag</tt> <a class="iref" href="#rfc.iref.g.1"><b>2</b></a></li> |
---|
1271 | <li class="indline1"><tt>ETag</tt> <a class="iref" href="#rfc.iref.g.4"><b>6.1</b></a></li> |
---|
1272 | <li class="indline1"><tt>ETag-v</tt> <a class="iref" href="#rfc.iref.g.5"><b>6.1</b></a></li> |
---|
1273 | <li class="indline1"><tt>If-Match</tt> <a class="iref" href="#rfc.iref.g.6"><b>6.2</b></a></li> |
---|
1274 | <li class="indline1"><tt>If-Match-v</tt> <a class="iref" href="#rfc.iref.g.7"><b>6.2</b></a></li> |
---|
1275 | <li class="indline1"><tt>If-Modified-Since</tt> <a class="iref" href="#rfc.iref.g.8"><b>6.3</b></a></li> |
---|
1276 | <li class="indline1"><tt>If-Modified-Since-v</tt> <a class="iref" href="#rfc.iref.g.9"><b>6.3</b></a></li> |
---|
1277 | <li class="indline1"><tt>If-None-Match</tt> <a class="iref" href="#rfc.iref.g.10"><b>6.4</b></a></li> |
---|
1278 | <li class="indline1"><tt>If-None-Match-v</tt> <a class="iref" href="#rfc.iref.g.11"><b>6.4</b></a></li> |
---|
1279 | <li class="indline1"><tt>If-Unmodified-Since</tt> <a class="iref" href="#rfc.iref.g.12"><b>6.5</b></a></li> |
---|
1280 | <li class="indline1"><tt>If-Unmodified-Since-v</tt> <a class="iref" href="#rfc.iref.g.13"><b>6.5</b></a></li> |
---|
1281 | <li class="indline1"><tt>Last-Modified</tt> <a class="iref" href="#rfc.iref.g.14"><b>6.6</b></a></li> |
---|
1282 | <li class="indline1"><tt>Last-Modified-v</tt> <a class="iref" href="#rfc.iref.g.15"><b>6.6</b></a></li> |
---|
1283 | <li class="indline1"><tt>opaque-tag</tt> <a class="iref" href="#rfc.iref.g.3"><b>2</b></a></li> |
---|
1284 | <li class="indline1"><tt>weak</tt> <a class="iref" href="#rfc.iref.g.2"><b>2</b></a></li> |
---|
1285 | </ul> |
---|
1286 | </li> |
---|
1287 | </ul> |
---|
1288 | </li> |
---|
1289 | <li class="indline0"><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul class="ind"> |
---|
1290 | <li class="indline1">Headers |
---|
1291 | <ul class="ind"> |
---|
1292 | <li class="indline1">ETag <a class="iref" href="#rfc.xref.header.etag.1">2</a>, <a class="iref" href="#rfc.iref.h.1"><b>6.1</b></a>, <a class="iref" href="#rfc.xref.header.etag.2">7.1</a></li> |
---|
1293 | <li class="indline1">If-Match <a class="iref" href="#rfc.xref.header.if-match.1">2</a>, <a class="iref" href="#rfc.xref.header.if-match.2">6.1</a>, <a class="iref" href="#rfc.iref.h.2"><b>6.2</b></a>, <a class="iref" href="#rfc.xref.header.if-match.3">7.1</a></li> |
---|
1294 | <li class="indline1">If-Modified-Since <a class="iref" href="#rfc.iref.h.3"><b>6.3</b></a>, <a class="iref" href="#rfc.xref.header.if-modified-since.1">7.1</a></li> |
---|
1295 | <li class="indline1">If-None-Match <a class="iref" href="#rfc.xref.header.if-none-match.1">2</a>, <a class="iref" href="#rfc.xref.header.if-none-match.2">6.1</a>, <a class="iref" href="#rfc.iref.h.4"><b>6.4</b></a>, <a class="iref" href="#rfc.xref.header.if-none-match.3">7.1</a>, <a class="iref" href="#rfc.xref.header.if-none-match.4">A.1</a></li> |
---|
1296 | <li class="indline1">If-Unmodified-Since <a class="iref" href="#rfc.iref.h.5"><b>6.5</b></a>, <a class="iref" href="#rfc.xref.header.if-unmodified-since.1">7.1</a></li> |
---|
1297 | <li class="indline1">Last-Modified <a class="iref" href="#rfc.iref.h.6"><b>6.6</b></a>, <a class="iref" href="#rfc.xref.header.last-modified.1">7.1</a></li> |
---|
1298 | </ul> |
---|
1299 | </li> |
---|
1300 | </ul> |
---|
1301 | </li> |
---|
1302 | <li class="indline0"><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul class="ind"> |
---|
1303 | <li class="indline1">If-Match header <a class="iref" href="#rfc.xref.header.if-match.1">2</a>, <a class="iref" href="#rfc.xref.header.if-match.2">6.1</a>, <a class="iref" href="#rfc.iref.i.1"><b>6.2</b></a>, <a class="iref" href="#rfc.xref.header.if-match.3">7.1</a></li> |
---|
1304 | <li class="indline1">If-Modified-Since header <a class="iref" href="#rfc.iref.i.2"><b>6.3</b></a>, <a class="iref" href="#rfc.xref.header.if-modified-since.1">7.1</a></li> |
---|
1305 | <li class="indline1">If-None-Match header <a class="iref" href="#rfc.xref.header.if-none-match.1">2</a>, <a class="iref" href="#rfc.xref.header.if-none-match.2">6.1</a>, <a class="iref" href="#rfc.iref.i.3"><b>6.4</b></a>, <a class="iref" href="#rfc.xref.header.if-none-match.3">7.1</a>, <a class="iref" href="#rfc.xref.header.if-none-match.4">A.1</a></li> |
---|
1306 | <li class="indline1">If-Unmodified-Since header <a class="iref" href="#rfc.iref.i.4"><b>6.5</b></a>, <a class="iref" href="#rfc.xref.header.if-unmodified-since.1">7.1</a></li> |
---|
1307 | </ul> |
---|
1308 | </li> |
---|
1309 | <li class="indline0"><a id="rfc.index.L" href="#rfc.index.L"><b>L</b></a><ul class="ind"> |
---|
1310 | <li class="indline1">Last-Modified header <a class="iref" href="#rfc.iref.l.1"><b>6.6</b></a>, <a class="iref" href="#rfc.xref.header.last-modified.1">7.1</a></li> |
---|
1311 | </ul> |
---|
1312 | </li> |
---|
1313 | <li class="indline0"><a id="rfc.index.P" href="#rfc.index.P"><b>P</b></a><ul class="ind"> |
---|
1314 | <li class="indline1"><em>Part1</em> <a class="iref" href="#rfc.xref.Part1.1">1.2</a>, <a class="iref" href="#rfc.xref.Part1.2">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.3">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.4">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.5">1.2.2</a>, <a class="iref" href="#rfc.xref.Part1.6">3.1</a>, <a class="iref" href="#rfc.xref.Part1.7">3.1</a>, <a class="iref" href="#rfc.xref.Part1.8">8</a>, <a class="iref" href="#Part1"><b>10.1</b></a><ul class="ind"> |
---|
1315 | <li class="indline1"><em>Section 1.2</em> <a class="iref" href="#rfc.xref.Part1.1">1.2</a></li> |
---|
1316 | <li class="indline1"><em>Section 1.2.2</em> <a class="iref" href="#rfc.xref.Part1.2">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.3">1.2.1</a>, <a class="iref" href="#rfc.xref.Part1.4">1.2.1</a></li> |
---|
1317 | <li class="indline1"><em>Section 3.2.1</em> <a class="iref" href="#rfc.xref.Part1.5">1.2.2</a></li> |
---|
1318 | <li class="indline1"><em>Section 8.3.1</em> <a class="iref" href="#rfc.xref.Part1.6">3.1</a></li> |
---|
1319 | <li class="indline1"><em>Section 8.3</em> <a class="iref" href="#rfc.xref.Part1.7">3.1</a></li> |
---|
1320 | </ul> |
---|
1321 | </li> |
---|
1322 | <li class="indline1"><em>Part5</em> <a class="iref" href="#rfc.xref.Part5.1">2</a>, <a class="iref" href="#rfc.xref.Part5.2">4</a>, <a class="iref" href="#rfc.xref.Part5.3">4</a>, <a class="iref" href="#rfc.xref.Part5.4">6.1</a>, <a class="iref" href="#rfc.xref.Part5.5">6.3</a>, <a class="iref" href="#Part5"><b>10.1</b></a><ul class="ind"> |
---|
1323 | <li class="indline1"><em>Section 5.3</em> <a class="iref" href="#rfc.xref.Part5.1">2</a>, <a class="iref" href="#rfc.xref.Part5.4">6.1</a></li> |
---|
1324 | <li class="indline1"><em>Section 5.4</em> <a class="iref" href="#rfc.xref.Part5.5">6.3</a></li> |
---|
1325 | </ul> |
---|
1326 | </li> |
---|
1327 | <li class="indline1"><em>Part6</em> <a class="iref" href="#rfc.xref.Part6.1">1</a>, <a class="iref" href="#rfc.xref.Part6.2">6.2</a>, <a class="iref" href="#rfc.xref.Part6.3">6.4</a>, <a class="iref" href="#Part6"><b>10.1</b></a><ul class="ind"> |
---|
1328 | <li class="indline1"><em>Section 15.5</em> <a class="iref" href="#rfc.xref.Part6.2">6.2</a>, <a class="iref" href="#rfc.xref.Part6.3">6.4</a></li> |
---|
1329 | </ul> |
---|
1330 | </li> |
---|
1331 | </ul> |
---|
1332 | </li> |
---|
1333 | <li class="indline0"><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul class="ind"> |
---|
1334 | <li class="indline1"><em>RFC2119</em> <a class="iref" href="#rfc.xref.RFC2119.1">1.1</a>, <a class="iref" href="#RFC2119"><b>10.1</b></a></li> |
---|
1335 | <li class="indline1"><em>RFC2616</em> <a class="iref" href="#rfc.xref.RFC2616.1">1</a>, <a class="iref" href="#RFC2616"><b>10.2</b></a>, <a class="iref" href="#rfc.xref.RFC2616.2">C.1</a></li> |
---|
1336 | <li class="indline1"><em>RFC3864</em> <a class="iref" href="#rfc.xref.RFC3864.1">7.1</a>, <a class="iref" href="#RFC3864"><b>10.2</b></a></li> |
---|
1337 | <li class="indline1"><em>RFC5234</em> <a class="iref" href="#rfc.xref.RFC5234.1">1.2</a>, <a class="iref" href="#RFC5234"><b>10.1</b></a><ul class="ind"> |
---|
1338 | <li class="indline1"><em>Appendix B.1</em> <a class="iref" href="#rfc.xref.RFC5234.1">1.2</a></li> |
---|
1339 | </ul> |
---|
1340 | </li> |
---|
1341 | </ul> |
---|
1342 | </li> |
---|
1343 | <li class="indline0"><a id="rfc.index.S" href="#rfc.index.S"><b>S</b></a><ul class="ind"> |
---|
1344 | <li class="indline1">Status Codes |
---|
1345 | <ul class="ind"> |
---|
1346 | <li class="indline1">304 Not Modified <a class="iref" href="#rfc.iref.s.1"><b>3.1</b></a></li> |
---|
1347 | <li class="indline1">412 Precondition Failed <a class="iref" href="#rfc.iref.s.2"><b>3.2</b></a></li> |
---|
1348 | </ul> |
---|
1349 | </li> |
---|
1350 | </ul> |
---|
1351 | </li> |
---|
1352 | </ul> |
---|
1353 | </div> |
---|
1354 | </body> |
---|
1355 | </html> |
---|