source: draft-ietf-httpbis/latest/p4-conditional.html @ 2748

Last change on this file since 2748 was 2748, checked in by julian.reschke@…, 6 years ago

Update XSLTs, fix Makefile wrt sorting of ABNF, regen HTML

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html;charset=utf-8
File size: 118.0 KB
1<!DOCTYPE html
2  PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html lang="en">
4   <head profile="">
5      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6      <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title><script type="application/javascript">
7var buttonsAdded = false;
9function initFeedback() {
10  var fb = document.createElement("div");
11  fb.className = "feedback noprint";
12  fb.setAttribute("onclick", "feedback();");
13  fb.appendChild(document.createTextNode("feedback"));
15  document.body.appendChild(fb);
18function feedback() {
19  toggleButtonsToElementsByName("h2");
20  toggleButtonsToElementsByName("h3");
21  toggleButtonsToElementsByName("h4");
22  toggleButtonsToElementsByName("h5");
24  buttonsAdded = !buttonsAdded;
27function toggleButtonsToElementsByName(name) {
28  var list = document.getElementsByTagName(name);
29  for (var i = 0; i < list.length; i++) {
30    toggleButton(list.item(i));
31  }
34function toggleButton(node) {
35  if (! buttonsAdded) {
37    // docname
38    var template = "{docname},%20%22{section}%22&body=<{ref}>:";
40    var id = node.getAttribute("id");
41    // better id available?
42    var titlelinks = node.getElementsByTagName("a");
43    for (var i = 0; i < titlelinks.length; i++) {
44      var tl = titlelinks.item(i);
45      if (tl.getAttribute("id")) {
46        id = tl.getAttribute("id");
47      }
48    }
50    // ref
51    var ref = window.location.toString();
52    var hash = ref.indexOf("#");
53    if (hash != -1) {
54      ref = ref.substring(0, hash);
55    }
56    if (id != "") {
57      ref += "#" + id;
58    }
60    // docname
61    var docname = "draft-ietf-httpbis-p4-conditional-latest";
63    // section
64    var section = node.textContent;
65    section = section.replace("\u00a0", " ");
67    // build URI from template
68    var uri = template.replace("{docname}", encodeURIComponent(docname));
69    uri = uri.replace("{section}", encodeURIComponent(section));
70    uri = uri.replace("{ref}", encodeURIComponent(ref));
72    var button = document.createElement("a");
73    button.className = "fbbutton noprint";
74    button.setAttribute("href", uri);
75    button.appendChild(document.createTextNode("send feedback"));
76    node.appendChild(button);
77  }
78  else {
79    var buttons = node.getElementsByTagName("a");
80    for (var i = 0; i < buttons.length; i++) {
81      var b = buttons.item(i);
82      if (b.className == "fbbutton noprint") {
83        node.removeChild(b);
84      }
85    }
86  }
87}</script><style type="text/css" title="Xml2Rfc (sans serif)">
88a {
89  text-decoration: none;
91a.smpl {
92  color: black;
94a:hover {
95  text-decoration: underline;
97a:active {
98  text-decoration: underline;
100address {
101  margin-top: 1em;
102  margin-left: 2em;
103  font-style: normal;
105body {
106  color: black;
107  font-family: cambria, georgia, serif;
108  font-size: 12pt;
109  margin: 2em auto;
110  max-width: 1000px;
112samp, tt, code, pre {
113  font-family: consolas, monaco, monospace;
115cite {
116  font-style: normal;
118div.note {
119  margin-left: 2em;
121dl {
122  margin-left: 2em;
124dl > dt {
125  float: left;
126  margin-right: 1em;
128dl.nohang > dt {
129  float: none;
131dl > dd {
132  margin-bottom: .5em;
134dl.compact > dd {
135  margin-bottom: .0em;
137dl > dd > dl {
138  margin-top: 0.5em;
140ul.empty {
141  list-style-type: none;
143ul.empty li {
144  margin-top: .5em;
146dl p {
147  margin-left: 0em;
149dl.reference > dt {
150  font-weight: bold;
152dl.reference > dd {
153  margin-left: 6em;
155h1 {
156  color: green;
157  font-size: 150%;
158  line-height: 18pt;
159  font-weight: bold;
160  text-align: center;
161  margin-top: 36pt;
162  margin-bottom: 0pt;
164h2 {
165  font-size: 130%;
166  line-height: 21pt;
167  page-break-after: avoid;
168} {
170  page-break-before: always;
172h3 {
173  font-size: 120%;
174  line-height: 15pt;
175  page-break-after: avoid;
177h4 {
178  font-size: 110%;
179  page-break-after: avoid;
181h5, h6 {
182  page-break-after: avoid;
184h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
185  color: black;
187img {
188  margin-left: 3em;
190li {
191  margin-left: 2em;
193ol {
194  margin-left: 2em;
195} {
197  list-style-type: lower-alpha;
198} {
200  list-style-type: upper-alpha;
202ol p {
203  margin-left: 0em;
205p {
206  margin-left: 2em;
208pre {
209  font-size: 11pt;
210  margin-left: 3em;
211  background-color: lightyellow;
212  padding: .25em;
213  page-break-inside: avoid;
215pre.text2 {
216  border-style: dotted;
217  border-width: 1px;
218  background-color: #f0f0f0;
220pre.inline {
221  background-color: white;
222  padding: 0em;
223  page-break-inside: auto;
225pre.text {
226  border-style: dotted;
227  border-width: 1px;
228  background-color: #f8f8f8;
230pre.drawing {
231  border-style: solid;
232  border-width: 1px;
233  background-color: #f8f8f8;
234  padding: 2em;
236table {
237  margin-left: 2em;
238} {
240  vertical-align: top;
241  border-color: gray;
242} th {
244  border-color: gray;
245} td {
247  border-color: gray;
249table.all {
250  border-style: solid;
251  border-width: 2px;
253table.full {
254  border-style: solid;
255  border-width: 2px;
256} td {
258  vertical-align: top;
260table.all td {
261  border-style: solid;
262  border-width: 1px;
264table.full td {
265  border-style: none solid;
266  border-width: 1px;
267} th {
269  vertical-align: top;
271table.all th {
272  border-style: solid;
273  border-width: 1px;
275table.full th {
276  border-style: solid;
277  border-width: 1px 1px 2px 1px;
279table.headers th {
280  border-style: none none solid none;
281  border-width: 2px;
283table.tleft {
284  margin-right: auto;
286table.tright {
287  margin-left: auto;
289table.tcenter {
290  margin-left: auto;
291  margin-right: auto;
293caption {
294  caption-side: bottom;
295  font-weight: bold;
296  font-size: 10pt;
297  margin-top: .5em;
300table.header {
301  border-spacing: 1px;
302  width: 95%;
303  font-size: 11pt;
304  color: white;
305} {
307  vertical-align: top;
309td.topnowrap {
310  vertical-align: top;
311  white-space: nowrap;
313table.header td {
314  background-color: gray;
315  width: 50%;
317table.header a {
318  color: white;
320thead {
321  display:table-header-group;
323ul.toc, ul.toc ul {
324  list-style: none;
325  margin-left: 1.5em;
326  padding-left: 0em;
328ul.toc li {
329  line-height: 150%;
330  font-weight: bold;
331  margin-left: 0em;
333ul.toc li li {
334  line-height: normal;
335  font-weight: normal;
336  font-size: 11pt;
337  margin-left: 0em;
339li.excluded {
340  font-size: 0pt;
342ul p {
343  margin-left: 0em;
345.filename, h1, h2, h3, h4 {
346  font-family: candara, calibri, segoe, optima, arial, sans-serif;
348ul.ind, ul.ind ul {
349  list-style: none;
350  margin-left: 1.5em;
351  padding-left: 0em;
352  page-break-before: avoid;
354ul.ind li {
355  font-weight: bold;
356  line-height: 200%;
357  margin-left: 0em;
359ul.ind li li {
360  font-weight: normal;
361  line-height: 150%;
362  margin-left: 0em;
364.avoidbreakinside {
365  page-break-inside: avoid;
367.avoidbreakafter {
368  page-break-after: avoid;
370.bcp14 {
371  font-style: normal;
372  text-transform: lowercase;
373  font-variant: small-caps;
375.comment {
376  background-color: yellow;
377} {
379  text-align: center;
381.error {
382  color: red;
383  font-style: italic;
384  font-weight: bold;
386.figure {
387  font-weight: bold;
388  text-align: center;
389  font-size: 10pt;
391.filename {
392  color: #333333;
393  font-size: 112%;
394  font-weight: bold;
395  line-height: 21pt;
396  text-align: center;
397  margin-top: 0pt;
399.fn {
400  font-weight: bold;
402.left {
403  text-align: left;
405.right {
406  text-align: right;
408.warning {
409  font-size: 130%;
410  background-color: yellow;
411}.feedback {
412  position: fixed;
413  bottom: 1%;
414  right: 1%;
415  padding: 3px 5px;
416  color: white;
417  border-radius: 5px;
418  background: #006400;
419  border: 1px solid silver;
420  -webkit-user-select: none;
421  -moz-user-select: none;
422  -ms-user-select: none;
424.fbbutton {
425  margin-left: 1em;
426  color: #303030;
427  font-size: small;
428  font-weight: normal;
429  background: #d0d000;
430  padding: 1px 4px;
431  border: 1px solid silver;
432  border-radius: 5px;
434.publishedasrfc {
435  background-color: yellow;
436  color: green;
437  font-size: 14pt;
438  text-align: center;
441@media screen {
442  pre.text, pre.text2 {
443    width: 69em;
444  }
447@media print {
448  .noprint {
449    display: none;
450  }
452  a {
453    color: black;
454    text-decoration: none;
455  }
457  table.header {
458    width: 90%;
459  }
461  td.header {
462    width: 50%;
463    color: black;
464    background-color: white;
465    vertical-align: top;
466    font-size: 110%;
467  }
469  ul.toc a:last-child::after {
470    content: leader('.') target-counter(attr(href), page);
471  }
473  ul.ind li li a {
474    content: target-counter(attr(href), page);
475  }
477  pre {
478    font-size: 10pt;
479  }
481  .print2col {
482    column-count: 2;
483    -moz-column-count: 2;
484    column-fill: auto;
485  }
488@page {
489  @top-left {
490       content: "Internet-Draft";
491  }
492  @top-right {
493       content: "June 2014";
494  }
495  @top-center {
496       content: "HTTP/1.1 Conditional Requests";
497  }
498  @bottom-left {
499       content: "Fielding & Reschke";
500  }
501  @bottom-center {
502       content: "Expires December 2014";
503  }
504  @bottom-right {
505       content: "[Page " counter(page) "]";
506  }
509@page:first {
510    @top-left {
511      content: normal;
512    }
513    @top-right {
514      content: normal;
515    }
516    @top-center {
517      content: normal;
518    }
520</style><link rel="Contents" href="#rfc.toc">
521      <link rel="Author" href="#rfc.authors">
522      <link rel="Copyright" href="#rfc.copyrightnotice">
523      <link rel="Index" href="#rfc.index">
524      <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
525      <link rel="Chapter" title="2 Validators" href="#rfc.section.2">
526      <link rel="Chapter" title="3 Precondition Header Fields" href="#rfc.section.3">
527      <link rel="Chapter" title="4 Status Code Definitions" href="#rfc.section.4">
528      <link rel="Chapter" title="5 Evaluation" href="#rfc.section.5">
529      <link rel="Chapter" title="6 Precedence" href="#rfc.section.6">
530      <link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7">
531      <link rel="Chapter" title="8 Security Considerations" href="#rfc.section.8">
532      <link rel="Chapter" title="9 Acknowledgments" href="#rfc.section.9">
533      <link rel="Chapter" href="#rfc.section.10" title="10 References">
534      <link rel="Appendix" title="A Changes from RFC 2616" href="#rfc.section.A">
535      <link rel="Appendix" title="B Imported ABNF" href="#rfc.section.B">
536      <link rel="Appendix" title="C Collected ABNF" href="#rfc.section.C">
537      <link rel="Alternate" title="RFC7232" href="">
538      <link href="p2-semantics.html" rel="prev">
539      <link href="p5-range.html" rel="next">
540      <meta name="generator" content=", Revision 1.756, 2015/12/31 17:59:21, XSLT vendor: Saxonica">
541      <meta name="keywords" content="Hypertext Transfer Protocol, HTTP, HTTP conditional requests">
542      <link rel="schema.dct" href="">
543      <meta name="dct.creator" content="Fielding, R.">
544      <meta name="dct.creator" content="Reschke, J. F.">
545      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p4-conditional-latest">
546      <meta name="dct.issued" scheme="ISO8601" content="2014-06">
547      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
548      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false.">
549      <meta name="description" content="The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false.">
550   </head>
551   <body onload="initFeedback();">
552      <table class="header" id="rfc.headerblock">
553         <tbody>
554            <tr>
555               <td class="left">HTTPbis Working Group</td>
556               <td class="right">R. Fielding, Editor</td>
557            </tr>
558            <tr>
559               <td class="left">Internet-Draft</td>
560               <td class="right">Adobe</td>
561            </tr>
562            <tr>
563               <td class="left">Obsoletes: <a href="">2616</a> (if approved)
564               </td>
565               <td class="right">J. Reschke, Editor</td>
566            </tr>
567            <tr>
568               <td class="left">Intended status: Standards Track</td>
569               <td class="right">greenbytes</td>
570            </tr>
571            <tr>
572               <td class="left">Expires: December 2014</td>
573               <td class="right">June 2014</td>
574            </tr>
575         </tbody>
576      </table>
577      <div id="rfc.title">
578         <h1>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</h1>
579         <div class="filename">draft-ietf-httpbis-p4-conditional-latest</div>
580      </div>
581      <p class="publishedasrfc"><b>Note:</b> a later version of this document has been published as <a href="">RFC7232</a>.
583      </p>
584      <h2 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h2>
585      <p>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for
586         distributed, collaborative, hypertext information systems. This document defines HTTP/1.1
587         conditional requests, including metadata header fields for indicating state changes,
588         request header fields for making preconditions on such state, and rules for constructing
589         the responses to a conditional request when one or more preconditions evaluate to
590         false.
591      </p>
592      <h2 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h2>
593      <p>Discussion of this draft takes place on the HTTPBIS working group mailing list (,
594         which is archived at &lt;<a href=""></a>&gt;.
595      </p>
596      <p>The current issues list is at &lt;<a href=""></a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href=""></a>&gt;.
597      </p>
598      <p><em>This is a temporary document for the purpose of tracking the editorial changes made
599            during the AUTH48 (RFC publication) phase.</em>
600      </p>
601      <div id="rfc.status">
602         <h2><a href="#rfc.status">Status of This Memo</a></h2>
603         <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78
604            and BCP 79.
605         </p>
606         <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF).
607            Note that other groups may also distribute working documents as Internet-Drafts. The
608            list of current Internet-Drafts is at <a href=""></a>.
609         </p>
610         <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated,
611            replaced, or obsoleted by other documents at any time. It is inappropriate to use
612            Internet-Drafts as reference material or to cite them other than as “work in progress”.
613         </p>
614         <p>This Internet-Draft will expire in December 2014.</p>
615      </div>
616      <div id="rfc.copyrightnotice">
617         <h2><a href="#rfc.copyrightnotice">Copyright Notice</a></h2>
618         <p>Copyright © 2014 IETF Trust and the persons identified as the document authors. All
619            rights reserved.
620         </p>
621         <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
622            to IETF Documents (<a href=""></a>) in effect on the date of publication of this document. Please review these documents
623            carefully, as they describe your rights and restrictions with respect to this document.
624            Code Components extracted from this document must include Simplified BSD License text
625            as described in Section 4.e of the Trust Legal Provisions and are provided without
626            warranty as described in the Simplified BSD License.
627         </p>
628         <p>This document may contain material from IETF Documents or IETF Contributions published
629            or made publicly available before November 10, 2008. The person(s) controlling the
630            copyright in some of this material may not have granted the IETF Trust the right to
631            allow modifications of such material outside the IETF Standards Process. Without obtaining
632            an adequate license from the person(s) controlling the copyright in such materials,
633            this document may not be modified outside the IETF Standards Process, and derivative
634            works of it may not be created outside the IETF Standards Process, except to format
635            it for publication as an RFC or to translate it into languages other than English.
636         </p>
637      </div>
638      <hr class="noprint">
639      <div id="rfc.toc">
640         <h2 class="np"><a href="#rfc.toc">Table of Contents</a></h2>
641         <ul class="toc">
642            <li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul>
643                  <li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#conformance">Conformance and Error Handling</a></li>
644                  <li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a></li>
645               </ul>
646            </li>
647            <li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#validators">Validators</a><ul>
648                  <li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#weak.and.strong.validators">Weak versus Strong</a></li>
649                  <li><a href="#rfc.section.2.2">2.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.last-modified">Last-Modified</a><ul>
650                        <li><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#lastmod.generation">Generation</a></li>
651                        <li><a href="#rfc.section.2.2.2">2.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#lastmod.comparison">Comparison</a></li>
652                     </ul>
653                  </li>
654                  <li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.etag">ETag</a><ul>
655                        <li><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#entity.tag.generation">Generation</a></li>
656                        <li><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#entity.tag.comparison">Comparison</a></li>
657                        <li><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#example.entity.tag.vs.conneg">Example: Entity-Tags Varying on Content-Negotiated Resources</a></li>
658                     </ul>
659                  </li>
660                  <li><a href="#rfc.section.2.4">2.4</a>&nbsp;&nbsp;&nbsp;<a href="">When to Use Entity-Tags and Last-Modified Dates</a></li>
661               </ul>
662            </li>
663            <li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#preconditions">Precondition Header Fields</a><ul>
664                  <li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-match">If-Match</a></li>
665                  <li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-none-match">If-None-Match</a></li>
666                  <li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-modified-since">If-Modified-Since</a></li>
667                  <li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-unmodified-since">If-Unmodified-Since</a></li>
668                  <li><a href="#rfc.section.3.5">3.5</a>&nbsp;&nbsp;&nbsp;<a href="#header.if-range">If-Range</a></li>
669               </ul>
670            </li>
671            <li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.definitions">Status Code Definitions</a><ul>
672                  <li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.304">304 Not Modified</a></li>
673                  <li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#status.412">412 Precondition Failed</a></li>
674               </ul>
675            </li>
676            <li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#evaluation">Evaluation</a></li>
677            <li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#precedence">Precedence</a></li>
678            <li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul>
679                  <li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#status.code.registration">Status Code Registration</a></li>
680                  <li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
681               </ul>
682            </li>
683            <li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li>
684            <li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li>
685            <li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
686                  <li><a href="#rfc.section.10.1">10.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
687                  <li><a href="#rfc.section.10.2">10.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
688               </ul>
689            </li>
690            <li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li>
691            <li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#imported.abnf">Imported ABNF</a></li>
692            <li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li>
693            <li><a href="#rfc.index">Index</a></li>
694            <li><a href="#rfc.authors">Authors' Addresses</a></li>
695         </ul>
696      </div>
697      <div id="introduction">
698         <h2 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h2>
699         <div id="rfc.section.1.p.1">
700            <p>Conditional requests are HTTP requests <a href="#RFC7231" id="rfc.xref.RFC7231.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> that include one or more header fields indicating a precondition to be tested before
701               applying the method semantics to the target resource. This document defines the HTTP/1.1
702               conditional request mechanisms in terms of the architecture, syntax notation, and
703               conformance criteria defined in <a href="#RFC7230" id="rfc.xref.RFC7230.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.
704            </p>
705         </div>
706         <div id="rfc.section.1.p.2">
707            <p>Conditional GET requests are the most efficient mechanism for HTTP cache updates <a href="#RFC7234" id="rfc.xref.RFC7234.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>. Conditionals can also be applied to state-changing methods, such as PUT and DELETE,
708               to prevent the "lost update" problem: one client accidentally overwriting the work
709               of another client that has been acting in parallel.
710            </p>
711         </div>
712         <div id="rfc.section.1.p.3">
713            <p><span id="rfc.iref.s.1"></span> Conditional request preconditions are based on the state of the target resource as
714               a whole (its current value set) or the state as observed in a previously obtained
715               representation (one value in that set). A resource might have multiple current representations,
716               each with its own observable state. The conditional request mechanisms assume that
717               the mapping of requests to a "selected representation" (<a href="p2-semantics.html#representations" title="Representations">Section 3</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>) will be consistent over time if the server intends to take advantage of conditionals.
718               Regardless, if the mapping is inconsistent and the server is unable to select the
719               appropriate representation, then no harm will result when the precondition evaluates
720               to false.
721            </p>
722         </div>
723         <div id="rfc.section.1.p.4">
724            <p>The conditional request preconditions defined by this specification (<a href="#preconditions" title="Precondition Header Fields">Section&nbsp;3</a>) are evaluated when applicable to the recipient (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>) according to their order of precedence (<a href="#precedence" title="Precedence">Section&nbsp;6</a>).
725            </p>
726         </div>
727         <div id="conformance">
728            <h3 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a href="#conformance">Conformance and Error Handling</a></h3>
729            <div id="rfc.section.1.1.p.1">
730               <p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
731                  NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted
732                  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>.
733               </p>
734            </div>
735            <div id="rfc.section.1.1.p.2">
736               <p>Conformance criteria and considerations regarding error handling are defined in <a href="p1-messaging.html#conformance" title="Conformance and Error Handling">Section 2.5</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.
737               </p>
738            </div>
739         </div>
740         <div id="notation">
741            <h3 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a href="#notation">Syntax Notation</a></h3>
742            <div id="rfc.section.1.2.p.1">
743               <p>This specification uses the Augmented Backus-Naur Form (ABNF) notation of <a href="#RFC5234" id="rfc.xref.RFC5234.1"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a> with a list extension, defined in <a href="p1-messaging.html#abnf.extension" title="ABNF List Extension: #rule">Section 7</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, that allows for compact definition of comma-separated lists using a '#' operator
744                  (similar to how the '*' operator indicates repetition). <a href="#imported.abnf" title="Imported ABNF">Appendix&nbsp;B</a> describes rules imported from other documents. <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;C</a> shows the collected grammar with all list operators expanded to standard ABNF notation.
745               </p>
746            </div>
747         </div>
748      </div>
749      <div id="validators">
750         <h2 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#validators">Validators</a></h2>
751         <div id="rfc.section.2.p.1">
752            <p>This specification defines two forms of metadata that are commonly used to observe
753               resource state and test for preconditions: modification dates (<a href="#header.last-modified" id="rfc.xref.header.last-modified.1" title="Last-Modified">Section&nbsp;2.2</a>) and opaque entity tags (<a href="#header.etag" id="rfc.xref.header.etag.1" title="ETag">Section&nbsp;2.3</a>). Additional metadata that reflects resource state has been defined by various extensions
754               of HTTP, such as Web Distributed Authoring and Versioning (WebDAV, <a href="#RFC4918" id="rfc.xref.RFC4918.1"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a>), that are beyond the scope of this specification. A resource metadata value is referred
755               to as a "<dfn>validator</dfn>" when it is used within a precondition.
756            </p>
757         </div>
758         <div id="weak.and.strong.validators">
759            <h3 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a href="#weak.and.strong.validators">Weak versus Strong</a></h3>
760            <div id="rfc.section.2.1.p.1">
761               <p>Validators come in two flavors: strong or weak. Weak validators are easy to generate
762                  but are far less useful for comparisons. Strong validators are ideal for comparisons
763                  but can be very difficult (and occasionally impossible) to generate efficiently. Rather
764                  than impose that all forms of resource adhere to the same strength of validator, HTTP
765                  exposes the type of validator in use and imposes restrictions on when weak validators
766                  can be used as preconditions.
767               </p>
768            </div>
769            <div id="rfc.section.2.1.p.2">
770               <p>A "strong validator" is representation metadata that changes value whenever a change
771                  occurs to the representation data that would be observable in the payload body of
772                  a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to GET.
773               </p>
774            </div>
775            <div id="rfc.section.2.1.p.3">
776               <p>A strong validator might change for reasons other than a change to the representation
777                  data, such as when a semantically significant part of the representation metadata
778                  is changed (e.g., <a href="p2-semantics.html#header.content-type" class="smpl">Content-Type</a>), but it is in the best interests of the origin server to only change the value when
779                  it is necessary to invalidate the stored responses held by remote caches and authoring
780                  tools.
781               </p>
782            </div>
783            <div id="rfc.section.2.1.p.4">
784               <p>Cache entries might persist for arbitrarily long periods, regardless of expiration
785                  times. Thus, a cache might attempt to validate an entry using a validator that it
786                  obtained in the distant past. A strong validator is unique across all versions of
787                  all representations associated with a particular resource over time. However, there
788                  is no implication of uniqueness across representations of different resources (i.e.,
789                  the same strong validator might be in use for representations of multiple resources
790                  at the same time and does not imply that those representations are equivalent).
791               </p>
792            </div>
793            <div id="rfc.section.2.1.p.5">
794               <p>There are a variety of strong validators used in practice. The best are based on strict
795                  revision control, wherein each change to a representation always results in a unique
796                  node name and revision identifier being assigned before the representation is made
797                  accessible to GET. A collision-resistant hash function applied to the representation
798                  data is also sufficient if the data is available prior to the response header fields
799                  being sent and the digest does not need to be recalculated every time a validation
800                  request is received. However, if a resource has distinct representations that differ
801                  only in their metadata, such as might occur with content negotiation over media types
802                  that happen to share the same data format, then the origin server needs to incorporate
803                  additional information in the validator to distinguish those representations.
804               </p>
805            </div>
806            <div id="rfc.section.2.1.p.6">
807               <p>In contrast, a "weak validator" is representation metadata that might not change for
808                  every change to the representation data. This weakness might be due to limitations
809                  in how the value is calculated, such as clock resolution, an inability to ensure uniqueness
810                  for all possible representations of the resource, or a desire of the resource owner
811                  to group representations by some self-determined set of equivalency rather than unique
812                  sequences of data. An origin server <em class="bcp14">SHOULD</em> change a weak entity-tag whenever it considers prior representations to be unacceptable
813                  as a substitute for the current representation. In other words, a weak entity-tag
814                  ought to change whenever the origin server wants caches to invalidate old responses.
815               </p>
816            </div>
817            <div id="rfc.section.2.1.p.7">
818               <p>For example, the representation of a weather report that changes in content every
819                  second, based on dynamic measurements, might be grouped into sets of equivalent representations
820                  (from the origin server's perspective) with the same weak validator in order to allow
821                  cached representations to be valid for a reasonable period of time (perhaps adjusted
822                  dynamically based on server load or weather quality). Likewise, a representation's
823                  modification time, if defined with only one-second resolution, might be a weak validator
824                  if it is possible for the representation to be modified twice during a single second
825                  and retrieved between those modifications.
826               </p>
827            </div>
828            <div id="rfc.section.2.1.p.8">
829               <p>Likewise, a validator is weak if it is shared by two or more representations of a
830                  given resource at the same time, unless those representations have identical representation
831                  data. For example, if the origin server sends the same validator for a representation
832                  with a gzip content coding applied as it does for a representation with no content
833                  coding, then that validator is weak. However, two simultaneous representations might
834                  share the same strong validator if they differ only in the representation metadata,
835                  such as when two different media types are available for the same representation data.
836               </p>
837            </div>
838            <div id="rfc.section.2.1.p.9">
839               <p>Strong validators are usable for all conditional requests, including cache validation,
840                  partial content ranges, and "lost update" avoidance. Weak validators are only usable
841                  when the client does not require exact equality with previously obtained representation
842                  data, such as when validating a cache entry or limiting a web traversal to recent
843                  changes.
844               </p>
845            </div>
846         </div>
847         <div id="header.last-modified">
848            <h3 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a href="#header.last-modified">Last-Modified</a></h3>
849            <div id="rfc.section.2.2.p.1">
850               <p>The "Last-Modified" header field in a response provides a timestamp indicating the
851                  date and time at which the origin server believes the selected representation was
852                  last modified, as determined at the conclusion of handling the request.
853               </p>
854            </div>
855            <div id="rfc.figure.u.1"><pre class="inline"><span id="rfc.iref.g.1"></span>  <a href="#header.last-modified" class="smpl">Last-Modified</a> = <a href="#imported.abnf" class="smpl">HTTP-date</a>
857            <div id="rfc.section.2.2.p.2">
858               <p>An example of its use is</p>
859            </div>
860            <div id="rfc.figure.u.2"><pre class="text">  Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
862            <div id="lastmod.generation">
863               <h4 id="rfc.section.2.2.1"><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;<a href="#lastmod.generation">Generation</a></h4>
864               <div id="rfc.section.2.2.1.p.1">
865                  <p>An origin server <em class="bcp14">SHOULD</em> send Last-Modified for any selected representation for which a last modification date
866                     can be reasonably and consistently determined, since its use in conditional requests
867                     and evaluating cache freshness (<a href="#RFC7234" id="rfc.xref.RFC7234.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>) results in a substantial reduction of HTTP traffic on the Internet and can be a
868                     significant factor in improving service scalability and reliability.
869                  </p>
870               </div>
871               <div id="rfc.section.2.2.1.p.2">
872                  <p>A representation is typically the sum of many parts behind the resource interface.
873                     The last-modified time would usually be the most recent time that any of those parts
874                     were changed. How that value is determined for any given resource is an implementation
875                     detail beyond the scope of this specification. What matters to HTTP is how recipients
876                     of the Last-Modified header field can use its value to make conditional requests and
877                     test the validity of locally cached responses.
878                  </p>
879               </div>
880               <div id="rfc.section.2.2.1.p.3">
881                  <p>An origin server <em class="bcp14">SHOULD</em> obtain the Last-Modified value of the representation as close as possible to the time
882                     that it generates the <a href="" class="smpl">Date</a> field value for its response. This allows a recipient to make an accurate assessment
883                     of the representation's modification time, especially if the representation changes
884                     near the time that the response is generated.
885                  </p>
886               </div>
887               <div id="rfc.section.2.2.1.p.4">
888                  <p>An origin server with a clock <em class="bcp14">MUST NOT</em> send a Last-Modified date that is later than the server's time of message origination
889                     (<a href="" class="smpl">Date</a>). If the last modification time is derived from implementation-specific metadata
890                     that evaluates to some time in the future, according to the origin server's clock,
891                     then the origin server <em class="bcp14">MUST</em> replace that value with the message origination date. This prevents a future modification
892                     date from having an adverse impact on cache validation.
893                  </p>
894               </div>
895               <div id="rfc.section.2.2.1.p.5">
896                  <p>An origin server without a clock <em class="bcp14">MUST NOT</em> assign Last-Modified values to a response unless these values were associated with
897                     the resource by some other system or user with a reliable clock.
898                  </p>
899               </div>
900            </div>
901            <div id="lastmod.comparison">
902               <h4 id="rfc.section.2.2.2"><a href="#rfc.section.2.2.2">2.2.2</a>&nbsp;<a href="#lastmod.comparison">Comparison</a></h4>
903               <div id="rfc.section.2.2.2.p.1">
904                  <p>A Last-Modified time, when used as a validator in a request, is implicitly weak unless
905                     it is possible to deduce that it is strong, using the following rules:
906                  </p>
907                  <ul>
908                     <li>The validator is being compared by an origin server to the actual current validator
909                        for the representation and,
910                     </li>
911                     <li>That origin server reliably knows that the associated representation did not change
912                        twice during the second covered by the presented validator.
913                     </li>
914                  </ul>
915               </div>
916               <div id="rfc.section.2.2.2.p.2">
917                  <p>or </p>
918                  <ul>
919                     <li>The validator is about to be used by a client in an <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a>, <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a>, or <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> header field, because the client has a cache entry for the associated representation,
920                        and
921                     </li>
922                     <li>That cache entry includes a <a href="" class="smpl">Date</a> value, which gives the time when the origin server sent the original response, and
923                     </li>
924                     <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li>
925                  </ul>
926               </div>
927               <div id="rfc.section.2.2.2.p.3">
928                  <p>or </p>
929                  <ul>
930                     <li>The validator is being compared by an intermediate cache to the validator stored in
931                        its cache entry for the representation, and
932                     </li>
933                     <li>That cache entry includes a <a href="" class="smpl">Date</a> value, which gives the time when the origin server sent the original response, and
934                     </li>
935                     <li>The presented Last-Modified time is at least 60 seconds before the Date value.</li>
936                  </ul>
937               </div>
938               <div id="rfc.section.2.2.2.p.4">
939                  <p>This method relies on the fact that if two different responses were sent by the origin
940                     server during the same second, but both had the same Last-Modified time, then at least
941                     one of those responses would have a <a href="" class="smpl">Date</a> value equal to its Last-Modified time. The arbitrary 60-second limit guards against
942                     the possibility that the Date and Last-Modified values are generated from different
943                     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.
944                  </p>
945               </div>
946            </div>
947         </div>
948         <div id="header.etag">
949            <h3 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;<a href="#header.etag">ETag</a></h3>
950            <div id="rfc.section.2.3.p.1">
951               <p>The "ETag" header field in a response provides the current entity-tag for the selected
952                  representation, as determined at the conclusion of handling the request. An entity-tag
953                  is an opaque validator for differentiating between multiple representations of the
954                  same resource, regardless of whether those multiple representations are due to resource
955                  state changes over time, content negotiation resulting in multiple representations
956                  being valid at the same time, or both. An entity-tag consists of an opaque quoted
957                  string, possibly prefixed by a weakness indicator.
958               </p>
959            </div>
960            <div id="rfc.figure.u.3"><pre class="inline"><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span>  <a href="#header.etag" class="smpl">ETag</a>       = <a href="#header.etag" class="smpl">entity-tag</a>
962  <a href="#header.etag" class="smpl">entity-tag</a> = [ <a href="#header.etag" class="smpl">weak</a> ] <a href="#header.etag" class="smpl">opaque-tag</a>
963  <a href="#header.etag" class="smpl">weak</a>       = %x57.2F ; "W/", case-sensitive
964  <a href="#header.etag" class="smpl">opaque-tag</a> = <a href="#imported.abnf" class="smpl">DQUOTE</a> *<a href="#header.etag" class="smpl">etagc</a> <a href="#imported.abnf" class="smpl">DQUOTE</a>
965  <a href="#header.etag" class="smpl">etagc</a>      = %x21 / %x23-7E / <a href="#imported.abnf" class="smpl">obs-text</a>
966             ; <a href="#imported.abnf" class="smpl">VCHAR</a> except double quotes, plus obs-text
968            <div class="note">
969               <div id="rfc.section.2.3.p.2">
970                  <p><b>Note:</b> Previously, opaque-tag was defined to be a quoted-string (<a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="">Section 3.11</a>); thus, some recipients might perform backslash unescaping. Servers therefore ought
971                     to avoid backslash characters in entity tags.
972                  </p>
973               </div>
974            </div>
975            <div id="rfc.section.2.3.p.3">
976               <p>An entity-tag can be more reliable for validation than a modification date in situations
977                  where it is inconvenient to store modification dates, where the one-second resolution
978                  of HTTP date values is not sufficient, or where modification dates are not consistently
979                  maintained.
980               </p>
981            </div>
982            <div id="rfc.figure.u.4">
983               <p>Examples:</p><pre class="text">  ETag: "xyzzy"
984  ETag: W/"xyzzy"
985  ETag: ""
987            <div id="rfc.section.2.3.p.4">
988               <p>An entity-tag can be either a weak or strong validator, with strong being the default.
989                  If an origin server provides an entity-tag for a representation and the generation
990                  of that entity-tag does not satisfy all of the characteristics of a strong validator
991                  (<a href="#weak.and.strong.validators" title="Weak versus Strong">Section&nbsp;2.1</a>), then the origin server <em class="bcp14">MUST</em> mark the entity-tag as weak by prefixing its opaque value with "W/" (case-sensitive).
992               </p>
993            </div>
994            <div id="entity.tag.generation">
995               <h4 id="rfc.section.2.3.1"><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;<a href="#entity.tag.generation">Generation</a></h4>
996               <div id="rfc.section.2.3.1.p.1">
997                  <p>The principle behind entity-tags is that only the service author knows the implementation
998                     of a resource well enough to select the most accurate and efficient validation mechanism
999                     for that resource, and that any such mechanism can be mapped to a simple sequence
1000                     of octets for easy comparison. Since the value is opaque, there is no need for the
1001                     client to be aware of how each entity-tag is constructed.
1002                  </p>
1003               </div>
1004               <div id="rfc.section.2.3.1.p.2">
1005                  <p>For example, a resource that has implementation-specific versioning applied to all
1006                     changes might use an internal revision number, perhaps combined with a variance identifier
1007                     for content negotiation, to accurately differentiate between representations. Other
1008                     implementations might use a collision-resistant hash of representation content, a
1009                     combination of various file attributes, or a modification timestamp that has sub-second
1010                     resolution.
1011                  </p>
1012               </div>
1013               <div id="rfc.section.2.3.1.p.3">
1014                  <p>An origin server <em class="bcp14">SHOULD</em> send an ETag for any selected representation for which detection of changes can be
1015                     reasonably and consistently determined, since the entity-tag's use in conditional
1016                     requests and evaluating cache freshness (<a href="#RFC7234" id="rfc.xref.RFC7234.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>) can result in a substantial reduction of HTTP network traffic and can be a significant
1017                     factor in improving service scalability and reliability.
1018                  </p>
1019               </div>
1020            </div>
1021            <div id="entity.tag.comparison">
1022               <h4 id="rfc.section.2.3.2"><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;<a href="#entity.tag.comparison">Comparison</a></h4>
1023               <div id="rfc.section.2.3.2.p.1">
1024                  <p>There are two entity-tag comparison functions, depending on whether or not the comparison
1025                     context allows the use of weak validators:
1026                  </p>
1027                  <ul>
1028                     <li><dfn>Strong comparison</dfn>: two entity-tags are equivalent if both are not weak and their opaque-tags match
1029                        character-by-character.
1030                     </li>
1031                     <li><dfn>Weak comparison</dfn>: two entity-tags are equivalent if their opaque-tags match character-by-character,
1032                        regardless of either or both being tagged as "weak".
1033                     </li>
1034                  </ul>
1035               </div>
1036               <div id="rfc.section.2.3.2.p.2" class="avoidbreakafter">
1037                  <p>The example below shows the results for a set of entity-tag pairs and both the weak
1038                     and strong comparison function results:
1039                  </p>
1040               </div>
1041               <div id="rfc.table.u.1">
1042                  <table class="tt full tleft" cellpadding="3" cellspacing="0">
1043                     <thead>
1044                        <tr>
1045                           <th>ETag 1</th>
1046                           <th>ETag 2</th>
1047                           <th>Strong Comparison</th>
1048                           <th>Weak Comparison</th>
1049                        </tr>
1050                     </thead>
1051                     <tbody>
1052                        <tr>
1053                           <td class="left">W/"1"</td>
1054                           <td class="left">W/"1"</td>
1055                           <td class="left">no match</td>
1056                           <td class="left">match</td>
1057                        </tr>
1058                        <tr>
1059                           <td class="left">W/"1"</td>
1060                           <td class="left">W/"2"</td>
1061                           <td class="left">no match</td>
1062                           <td class="left">no match</td>
1063                        </tr>
1064                        <tr>
1065                           <td class="left">W/"1"</td>
1066                           <td class="left">"1"</td>
1067                           <td class="left">no match</td>
1068                           <td class="left">match</td>
1069                        </tr>
1070                        <tr>
1071                           <td class="left">"1"</td>
1072                           <td class="left">"1"</td>
1073                           <td class="left">match</td>
1074                           <td class="left">match</td>
1075                        </tr>
1076                     </tbody>
1077                  </table>
1078               </div>
1079            </div>
1080            <div id="example.entity.tag.vs.conneg">
1081               <h4 id="rfc.section.2.3.3"><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;<a href="#example.entity.tag.vs.conneg">Example: Entity-Tags Varying on Content-Negotiated Resources</a></h4>
1082               <div id="rfc.section.2.3.3.p.1" class="avoidbreakafter">
1083                  <p>Consider a resource that is subject to content negotiation (<a href="p2-semantics.html#content.negotiation" title="Content Negotiation">Section 3.4</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>), and where the representations sent in response to a GET request vary based on the <a href="p2-semantics.html#header.accept-encoding" class="smpl">Accept-Encoding</a> request header field (<a href="p2-semantics.html#header.accept-encoding" title="Accept-Encoding">Section 5.3.4</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>):
1084                  </p>
1085               </div>
1086               <div id="rfc.figure.u.5">
1087                  <p>&gt;&gt; Request:</p><pre class="text2">GET /index HTTP/1.1
1089Accept-Encoding: gzip
1092               <div id="rfc.section.2.3.3.p.2" class="avoidbreakafter">
1093                  <p>In this case, the response might or might not use the gzip content coding. If it does
1094                     not, the response might look like:
1095                  </p>
1096               </div>
1097               <div id="rfc.figure.u.6">
1098                  <p>&gt;&gt; Response:</p><pre class="text">HTTP/1.1 200 OK
1099Date: Fri, 26 Mar 2010 00:05:00 GMT
1100ETag: "123-a"
1101Content-Length: 70
1102Vary: Accept-Encoding
1103Content-Type: text/plain
1105<span id="exbody">Hello World!
1106Hello World!
1107Hello World!
1108Hello World!
1109Hello World!
1111               <div id="rfc.section.2.3.3.p.3" class="avoidbreakafter">
1112                  <p>An alternative representation that does use gzip content coding would be:</p>
1113               </div>
1114               <div id="rfc.figure.u.7">
1115                  <p>&gt;&gt; Response:</p><pre class="text">HTTP/1.1 200 OK
1116Date: Fri, 26 Mar 2010 00:05:00 GMT
1117ETag: "123-b"
1118Content-Length: 43
1119Vary: Accept-Encoding
1120Content-Type: text/plain
1121Content-Encoding: gzip
1123<em>...binary data...</em></pre></div>
1124               <div class="note">
1125                  <div id="rfc.section.2.3.3.p.4">
1126                     <p><b>Note:</b> Content codings are a property of the representation data, so a strong entity-tag
1127                        for a content-encoded representation has to be distinct from the entity tag of an
1128                        unencoded representation to prevent potential conflicts during cache updates and range
1129                        requests. In contrast, transfer codings (<a href="p1-messaging.html#transfer.codings" title="Transfer Codings">Section 4</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) apply only during message transfer and do not result in distinct entity-tags.
1130                     </p>
1131                  </div>
1132               </div>
1133            </div>
1134         </div>
1135         <div id="">
1136            <h3 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a>&nbsp;<a href="">When to Use Entity-Tags and Last-Modified Dates</a></h3>
1137            <div id="rfc.section.2.4.p.1">
1138               <p>In <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> responses to GET or HEAD, an origin server:
1139               </p>
1140               <ul>
1141                  <li><em class="bcp14">SHOULD</em> send an entity-tag validator unless it is not feasible to generate one.
1142                  </li>
1143                  <li><em class="bcp14">MAY</em> send a weak entity-tag instead of a strong entity-tag, if performance considerations
1144                     support the use of weak entity-tags, or if it is unfeasible to send a strong entity-tag.
1145                  </li>
1146                  <li><em class="bcp14">SHOULD</em> send a <a href="#header.last-modified" class="smpl">Last-Modified</a> value if it is feasible to send one.
1147                  </li>
1148               </ul>
1149            </div>
1150            <div id="rfc.section.2.4.p.2">
1151               <p>In other words, the preferred behavior for an origin server is to send both a strong
1152                  entity-tag and a <a href="#header.last-modified" class="smpl">Last-Modified</a> value in successful responses to a retrieval request.
1153               </p>
1154            </div>
1155            <div id="rfc.section.2.4.p.3">
1156               <p>A client: </p>
1157               <ul>
1158                  <li><em class="bcp14">MUST</em> send that entity-tag in any cache validation request (using <a href="#header.if-match" class="smpl">If-Match</a> or <a href="#header.if-none-match" class="smpl">If-None-Match</a>) if an entity-tag has been provided by the origin server.
1159                  </li>
1160                  <li><em class="bcp14">SHOULD</em> send the <a href="#header.last-modified" class="smpl">Last-Modified</a> value in non-subrange cache validation requests (using <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a>) if only a Last-Modified value has been provided by the origin server.
1161                  </li>
1162                  <li><em class="bcp14">MAY</em> send the <a href="#header.last-modified" class="smpl">Last-Modified</a> value in subrange cache validation requests (using <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a>) if only a Last-Modified value has been provided by an HTTP/1.0 origin server. The
1163                     user agent <em class="bcp14">SHOULD</em> provide a way to disable this, in case of difficulty.
1164                  </li>
1165                  <li><em class="bcp14">SHOULD</em> send both validators in cache validation requests if both an entity-tag and a <a href="#header.last-modified" class="smpl">Last-Modified</a> value have been provided by the origin server. This allows both HTTP/1.0 and HTTP/1.1
1166                     caches to respond appropriately.
1167                  </li>
1168               </ul>
1169            </div>
1170         </div>
1171      </div>
1172      <div id="preconditions">
1173         <h2 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#preconditions">Precondition Header Fields</a></h2>
1174         <div id="rfc.section.3.p.1">
1175            <p>This section defines the syntax and semantics of HTTP/1.1 header fields for applying
1176               preconditions on requests. <a href="#evaluation" title="Evaluation">Section&nbsp;5</a> defines when the preconditions are applied. <a href="#precedence" title="Precedence">Section&nbsp;6</a> defines the order of evaluation when more than one precondition is present.
1177            </p>
1178         </div>
1179         <div id="header.if-match">
1180            <h3 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a href="#header.if-match">If-Match</a></h3>
1181            <div id="rfc.section.3.1.p.1">
1182               <p>The "If-Match" header field makes the request method conditional on the recipient
1183                  origin server either having at least one current representation of the target resource,
1184                  when the field-value is "*", or having a current representation of the target resource
1185                  that has an entity-tag matching a member of the list of entity-tags provided in the
1186                  field-value.
1187               </p>
1188            </div>
1189            <div id="rfc.section.3.1.p.2">
1190               <p>An origin server <em class="bcp14">MUST</em> use the strong comparison function when comparing entity-tags for If-Match (<a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), since the client intends this precondition to prevent the method from being applied
1191                  if there have been any changes to the representation data.
1192               </p>
1193            </div>
1194            <div id="rfc.figure.u.8"><pre class="inline"><span id="rfc.iref.g.7"></span>  <a href="#header.if-match" class="smpl">If-Match</a> = "*" / 1#<a href="#header.etag" class="smpl">entity-tag</a>
1196            <div id="rfc.section.3.1.p.3" class="avoidbreakafter">
1197               <p>Examples:</p>
1198            </div>
1199            <div id="rfc.figure.u.9"><pre class="text">  If-Match: "xyzzy"
1200  If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
1201  If-Match: *
1203            <div id="rfc.section.3.1.p.4">
1204               <p>If-Match is most often used with state-changing methods (e.g., POST, PUT, DELETE)
1205                  to prevent accidental overwrites when multiple user agents might be acting in parallel
1206                  on the same resource (i.e., to prevent the "lost update" problem). It can also be
1207                  used with safe methods to abort a request if the <a href="p2-semantics.html#representations" class="smpl">selected representation</a> does not match one already stored (or partially stored) from a prior request.
1208               </p>
1209            </div>
1210            <div id="rfc.section.3.1.p.5">
1211               <p>An origin server that receives an If-Match header field <em class="bcp14">MUST</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>). If the field-value is "*", the condition is false if the origin server does not
1212                  have a current representation for the target resource. If the field-value is a list
1213                  of entity-tags, the condition is false if none of the listed tags match the entity-tag
1214                  of the selected representation.
1215               </p>
1216            </div>
1217            <div id="rfc.section.3.1.p.6">
1218               <p>An origin server <em class="bcp14">MUST NOT</em> perform the requested method if a received If-Match condition evaluates to false;
1219                  instead, the origin server <em class="bcp14">MUST</em> respond with either a) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code or b) one of the <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> status codes if the origin server has verified that a state change is being requested
1220                  and the final state is already reflected in the current state of the target resource
1221                  (i.e., the change requested by the user agent has already succeeded, but the user
1222                  agent might not be aware of it, perhaps because the prior response was lost or a compatible
1223                  change was made by some other user agent). In the latter case, the origin server <em class="bcp14">MUST NOT</em> send a validator header field in the response unless it can verify that the request
1224                  is a duplicate of an immediately prior change made by the same user agent.
1225               </p>
1226            </div>
1227            <div id="rfc.section.3.1.p.7">
1228               <p>The If-Match header field can be ignored by caches and intermediaries because it is
1229                  not applicable to a stored response.
1230               </p>
1231            </div>
1232         </div>
1233         <div id="header.if-none-match">
1234            <h3 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a href="#header.if-none-match">If-None-Match</a></h3>
1235            <div id="rfc.section.3.2.p.1">
1236               <p>The "If-None-Match" header field makes the request method conditional on a recipient
1237                  cache or origin server either not having any current representation of the target
1238                  resource, when the field-value is "*", or having a selected representation with an
1239                  entity-tag that does not match any of those listed in the field-value.
1240               </p>
1241            </div>
1242            <div id="rfc.section.3.2.p.2">
1243               <p>A recipient <em class="bcp14">MUST</em> use the weak comparison function when comparing entity-tags for If-None-Match (<a href="#entity.tag.comparison" title="Comparison">Section&nbsp;2.3.2</a>), since weak entity-tags can be used for cache validation even if there have been
1244                  changes to the representation data.
1245               </p>
1246            </div>
1247            <div id="rfc.figure.u.10"><pre class="inline"><span id="rfc.iref.g.8"></span>  <a href="#header.if-none-match" class="smpl">If-None-Match</a> = "*" / 1#<a href="#header.etag" class="smpl">entity-tag</a>
1249            <div id="rfc.section.3.2.p.3" class="avoidbreakafter">
1250               <p>Examples:</p>
1251            </div>
1252            <div id="rfc.figure.u.11"><pre class="text">  If-None-Match: "xyzzy"
1253  If-None-Match: W/"xyzzy"
1254  If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
1255  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
1256  If-None-Match: *
1258            <div id="rfc.section.3.2.p.4">
1259               <p>If-None-Match is primarily used in conditional GET requests to enable efficient updates
1260                  of cached information with a minimum amount of transaction overhead. When a client
1261                  desires to update one or more stored responses that have entity-tags, the client <em class="bcp14">SHOULD</em> generate an If-None-Match header field containing a list of those entity-tags when
1262                  making a GET request; this allows recipient servers to send a <a href="#status.304" class="smpl">304 (Not Modified)</a> response to indicate when one of those stored responses matches the selected representation.
1263               </p>
1264            </div>
1265            <div id="rfc.section.3.2.p.5">
1266               <p>If-None-Match can also be used with a value of "*" to prevent an unsafe request method
1267                  (e.g., PUT) from inadvertently modifying an existing representation of the target
1268                  resource when the client believes that the resource does not have a current representation
1269                  (<a href="p2-semantics.html#safe.methods" title="Safe Methods">Section 4.2.1</a> of <a href="#RFC7231" id="rfc.xref.RFC7231.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>). This is a variation on the "lost update" problem that might arise if more than
1270                  one client attempts to create an initial representation for the target resource.
1271               </p>
1272            </div>
1273            <div id="rfc.section.3.2.p.6">
1274               <p>An origin server that receives an If-None-Match header field <em class="bcp14">MUST</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>). If the field-value is "*", the condition is false if the origin server has a current
1275                  representation for the target resource. If the field-value is a list of entity-tags,
1276                  the condition is false if one of the listed tags match the entity-tag of the selected
1277                  representation.
1278               </p>
1279            </div>
1280            <div id="rfc.section.3.2.p.7">
1281               <p>An origin server <em class="bcp14">MUST NOT</em> perform the requested method if the condition evaluates to false; instead, the origin
1282                  server <em class="bcp14">MUST</em> respond with either a) the <a href="#status.304" class="smpl">304 (Not Modified)</a> status code if the request method is GET or HEAD or b) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code for all other request methods.
1283               </p>
1284            </div>
1285            <div id="rfc.section.3.2.p.8">
1286               <p>Requirements on cache handling of a received If-None-Match header field are defined
1287                  in <a href="p6-cache.html#validation.received" title="Handling a Received Validation Request">Section 4.3.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.
1288               </p>
1289            </div>
1290         </div>
1291         <div id="header.if-modified-since">
1292            <h3 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;<a href="#header.if-modified-since">If-Modified-Since</a></h3>
1293            <div id="rfc.section.3.3.p.1">
1294               <p>The "If-Modified-Since" header field makes a GET or HEAD request method conditional
1295                  on the selected representation's modification date being more recent than the date
1296                  provided in the field-value. Transfer of the selected representation's data is avoided
1297                  if that data has not changed.
1298               </p>
1299            </div>
1300            <div id="rfc.figure.u.12"><pre class="inline"><span id="rfc.iref.g.9"></span>  <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = <a href="#imported.abnf" class="smpl">HTTP-date</a>
1302            <div id="rfc.section.3.3.p.2" class="avoidbreakafter">
1303               <p>An example of the field is:</p>
1304            </div>
1305            <div id="rfc.figure.u.13"><pre class="text">  If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
1307            <div id="rfc.section.3.3.p.3">
1308               <p>A recipient <em class="bcp14">MUST</em> ignore If-Modified-Since if the request contains an <a href="#header.if-none-match" class="smpl">If-None-Match</a> header field; the condition in <a href="#header.if-none-match" class="smpl">If-None-Match</a> is considered to be a more accurate replacement for the condition in If-Modified-Since,
1309                  and the two are only combined for the sake of interoperating with older intermediaries
1310                  that might not implement <a href="#header.if-none-match" class="smpl">If-None-Match</a>.
1311               </p>
1312            </div>
1313            <div id="rfc.section.3.3.p.4">
1314               <p>A recipient <em class="bcp14">MUST</em> ignore the If-Modified-Since header field if the received field-value is not a valid
1315                  HTTP-date, or if the request method is neither GET nor HEAD.
1316               </p>
1317            </div>
1318            <div id="rfc.section.3.3.p.5">
1319               <p>A recipient <em class="bcp14">MUST</em> interpret an If-Modified-Since field-value's timestamp in terms of the origin server's
1320                  clock.
1321               </p>
1322            </div>
1323            <div id="rfc.section.3.3.p.6">
1324               <p>If-Modified-Since is typically used for two distinct purposes: 1) to allow efficient
1325                  updates of a cached representation that does not have an entity-tag and 2) to limit
1326                  the scope of a web traversal to resources that have recently changed.
1327               </p>
1328            </div>
1329            <div id="rfc.section.3.3.p.7">
1330               <p>When used for cache updates, a cache will typically use the value of the cached message's <a href="#header.last-modified" class="smpl">Last-Modified</a> field to generate the field value of If-Modified-Since. This behavior is most interoperable
1331                  for cases where clocks are poorly synchronized or when the server has chosen to only
1332                  honor exact timestamp matches (due to a problem with Last-Modified dates that appear
1333                  to go "back in time" when the origin server's clock is corrected or a representation
1334                  is restored from an archived backup). However, caches occasionally generate the field
1335                  value based on other data, such as the <a href="" class="smpl">Date</a> header field of the cached message or the local clock time that the message was received,
1336                  particularly when the cached message does not contain a <a href="#header.last-modified" class="smpl">Last-Modified</a> field.
1337               </p>
1338            </div>
1339            <div id="rfc.section.3.3.p.8">
1340               <p>When used for limiting the scope of retrieval to a recent time window, a user agent
1341                  will generate an If-Modified-Since field value based on either its own local clock
1342                  or a <a href="" class="smpl">Date</a> header field received from the server in a prior response. Origin servers that choose
1343                  an exact timestamp match based on the selected representation's <a href="#header.last-modified" class="smpl">Last-Modified</a> field will not be able to help the user agent limit its data transfers to only those
1344                  changed during the specified window.
1345               </p>
1346            </div>
1347            <div id="rfc.section.3.3.p.9">
1348               <p>An origin server that receives an If-Modified-Since header field <em class="bcp14">SHOULD</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>). The origin server <em class="bcp14">SHOULD NOT</em> perform the requested method if the selected representation's last modification date
1349                  is earlier than or equal to the date provided in the field-value; instead, the origin
1350                  server <em class="bcp14">SHOULD</em> generate a <a href="#status.304" class="smpl">304 (Not Modified)</a> response, including only those metadata that are useful for identifying or updating
1351                  a previously cached response.
1352               </p>
1353            </div>
1354            <div id="rfc.section.3.3.p.10">
1355               <p>Requirements on cache handling of a received If-Modified-Since header field are defined
1356                  in <a href="p6-cache.html#validation.received" title="Handling a Received Validation Request">Section 4.3.2</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>.
1357               </p>
1358            </div>
1359         </div>
1360         <div id="header.if-unmodified-since">
1361            <h3 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a>&nbsp;<a href="#header.if-unmodified-since">If-Unmodified-Since</a></h3>
1362            <div id="rfc.section.3.4.p.1">
1363               <p>The "If-Unmodified-Since" header field makes the request method conditional on the
1364                  selected representation's last modification date being earlier than or equal to the
1365                  date provided in the field-value. This field accomplishes the same purpose as <a href="#header.if-match" class="smpl">If-Match</a> for cases where the user agent does not have an entity-tag for the representation.
1366               </p>
1367            </div>
1368            <div id="rfc.figure.u.14"><pre class="inline"><span id="rfc.iref.g.10"></span>  <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = <a href="#imported.abnf" class="smpl">HTTP-date</a>
1370            <div id="rfc.section.3.4.p.2" class="avoidbreakafter">
1371               <p>An example of the field is:</p>
1372            </div>
1373            <div id="rfc.figure.u.15"><pre class="text">  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
1375            <div id="rfc.section.3.4.p.3">
1376               <p>A recipient <em class="bcp14">MUST</em> ignore If-Unmodified-Since if the request contains an <a href="#header.if-match" class="smpl">If-Match</a> header field; the condition in <a href="#header.if-match" class="smpl">If-Match</a> is considered to be a more accurate replacement for the condition in If-Unmodified-Since,
1377                  and the two are only combined for the sake of interoperating with older intermediaries
1378                  that might not implement <a href="#header.if-match" class="smpl">If-Match</a>.
1379               </p>
1380            </div>
1381            <div id="rfc.section.3.4.p.4">
1382               <p>A recipient <em class="bcp14">MUST</em> ignore the If-Unmodified-Since header field if the received field-value is not a valid
1383                  HTTP-date.
1384               </p>
1385            </div>
1386            <div id="rfc.section.3.4.p.5">
1387               <p>A recipient <em class="bcp14">MUST</em> interpret an If-Unmodified-Since field-value's timestamp in terms of the origin server's
1388                  clock.
1389               </p>
1390            </div>
1391            <div id="rfc.section.3.4.p.6">
1392               <p>If-Unmodified-Since is most often used with state-changing methods (e.g., POST, PUT,
1393                  DELETE) to prevent accidental overwrites when multiple user agents might be acting
1394                  in parallel on a resource that does not supply entity-tags with its representations
1395                  (i.e., to prevent the "lost update" problem). It can also be used with safe methods
1396                  to abort a request if the <a href="p2-semantics.html#representations" class="smpl">selected representation</a> does not match one already stored (or partially stored) from a prior request.
1397               </p>
1398            </div>
1399            <div id="rfc.section.3.4.p.7">
1400               <p>An origin server that receives an If-Unmodified-Since header field <em class="bcp14">MUST</em> evaluate the condition prior to performing the method (<a href="#evaluation" title="Evaluation">Section&nbsp;5</a>). The origin server <em class="bcp14">MUST NOT</em> perform the requested method if the selected representation's last modification date
1401                  is more recent than the date provided in the field-value; instead the origin server <em class="bcp14">MUST</em> respond with either a) the <a href="#status.412" class="smpl">412 (Precondition Failed)</a> status code or b) one of the <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> status codes if the origin server has verified that a state change is being requested
1402                  and the final state is already reflected in the current state of the target resource
1403                  (i.e., the change requested by the user agent has already succeeded, but the user
1404                  agent might not be aware of that because the prior response message was lost or a
1405                  compatible change was made by some other user agent). In the latter case, the origin
1406                  server <em class="bcp14">MUST NOT</em> send a validator header field in the response unless it can verify that the request
1407                  is a duplicate of an immediately prior change made by the same user agent.
1408               </p>
1409            </div>
1410            <div id="rfc.section.3.4.p.8">
1411               <p>The If-Unmodified-Since header field can be ignored by caches and intermediaries because
1412                  it is not applicable to a stored response.
1413               </p>
1414            </div>
1415         </div>
1416         <div id="header.if-range">
1417            <h3 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a>&nbsp;<a href="#header.if-range">If-Range</a></h3>
1418            <div id="rfc.section.3.5.p.1">
1419               <p>The "If-Range" header field provides a special conditional request mechanism that
1420                  is similar to the <a href="#header.if-match" class="smpl">If-Match</a> and <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> header fields but that instructs the recipient to ignore the <a href="p5-range.html#header.range" class="smpl">Range</a> header field if the validator doesn't match, resulting in transfer of the new selected
1421                  representation instead of a <a href="#status.412" class="smpl">412 (Precondition Failed)</a> response. If-Range is defined in <a href="p5-range.html#header.if-range" title="If-Range">Section 3.2</a> of <a href="#RFC7233" id="rfc.xref.RFC7233.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a>.
1422               </p>
1423            </div>
1424         </div>
1425      </div>
1426      <div id="status.code.definitions">
1427         <h2 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#status.code.definitions">Status Code Definitions</a></h2>
1428         <div id="status.304">
1429            <h3 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;<a href="#status.304">304 Not Modified</a></h3>
1430            <div id="rfc.section.4.1.p.1">
1431               <p>The <dfn>304 (Not Modified)</dfn> status code indicates that a conditional GET or HEAD request has been received and
1432                  would have resulted in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response if it were not for the fact that the condition evaluated to false. In other
1433                  words, there is no need for the server to transfer a representation of the target
1434                  resource because the request indicates that the client, which made the request conditional,
1435                  already has a valid representation; the server is therefore redirecting the client
1436                  to make use of that stored representation as if it were the payload of a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response.
1437               </p>
1438            </div>
1439            <div id="rfc.section.4.1.p.2">
1440               <p>The server generating a 304 response <em class="bcp14">MUST</em> generate any of the following header fields that would have been sent in a <a href="p2-semantics.html#status.200" class="smpl">200 (OK)</a> response to the same request: <a href="p6-cache.html#header.cache-control" class="smpl">Cache-Control</a>, <a href="p2-semantics.html#header.content-location" class="smpl">Content-Location</a>, <a href="" class="smpl">Date</a>, <a href="#header.etag" class="smpl">ETag</a>, <a href="p6-cache.html#header.expires" class="smpl">Expires</a>, and <a href="p2-semantics.html#header.vary" class="smpl">Vary</a>.
1441               </p>
1442            </div>
1443            <div id="rfc.section.4.1.p.3">
1444               <p>Since the goal of a 304 response is to minimize information transfer when the recipient
1445                  already has one or more cached representations, a sender <em class="bcp14">SHOULD NOT</em> generate representation metadata other than the above listed fields unless said metadata
1446                  exists for the purpose of guiding cache updates (e.g., <a href="#header.last-modified" class="smpl">Last-Modified</a> might be useful if the response does not have an <a href="#header.etag" class="smpl">ETag</a> field).
1447               </p>
1448            </div>
1449            <div id="rfc.section.4.1.p.4">
1450               <p>Requirements on a cache that receives a 304 response are defined in <a href="p6-cache.html#freshening.responses" title="Freshening Stored Responses upon Validation">Section 4.3.4</a> of <a href="#RFC7234" id="rfc.xref.RFC7234.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>. If the conditional request originated with an outbound client, such as a user agent
1451                  with its own cache sending a conditional GET to a shared proxy, then the proxy <em class="bcp14">SHOULD</em> forward the 304 response to that client.
1452               </p>
1453            </div>
1454            <div id="rfc.section.4.1.p.5">
1455               <p>A 304 response cannot contain a message-body; it is always terminated by the first
1456                  empty line after the header fields.
1457               </p>
1458            </div>
1459         </div>
1460         <div id="status.412">
1461            <h3 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a href="#status.412">412 Precondition Failed</a></h3>
1462            <div id="rfc.section.4.2.p.1">
1463               <p>The <dfn>412 (Precondition Failed)</dfn> status code indicates that one or more conditions given in the request header fields
1464                  evaluated to false when tested on the server. This response code allows the client
1465                  to place preconditions on the current resource state (its current representations
1466                  and metadata) and, thus, prevent the request method from being applied if the target
1467                  resource is in an unexpected state.
1468               </p>
1469            </div>
1470         </div>
1471      </div>
1472      <div id="evaluation">
1473         <h2 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a href="#evaluation">Evaluation</a></h2>
1474         <div id="rfc.section.5.p.1">
1475            <p>Except when excluded below, a recipient cache or origin server <em class="bcp14">MUST</em> evaluate received request preconditions after it has successfully performed its normal
1476               request checks and just before it would perform the action associated with the request
1477               method. A server <em class="bcp14">MUST</em> ignore all received preconditions if its response to the same request without those
1478               conditions would have been a status code other than a <a href="p2-semantics.html#status.2xx" class="smpl">2xx (Successful)</a> or <a href="#status.412" class="smpl">412 (Precondition Failed)</a>. In other words, redirects and failures take precedence over the evaluation of preconditions
1479               in conditional requests.
1480            </p>
1481         </div>
1482         <div id="rfc.section.5.p.2">
1483            <p>A server that is not the origin server for the target resource and cannot act as a
1484               cache for requests on the target resource <em class="bcp14">MUST NOT</em> evaluate the conditional request header fields defined by this specification, and
1485               it <em class="bcp14">MUST</em> forward them if the request is forwarded, since the generating client intends that
1486               they be evaluated by a server that can provide a current representation. Likewise,
1487               a server <em class="bcp14">MUST</em> ignore the conditional request header fields defined by this specification when received
1488               with a request method that does not involve the selection or modification of a <a href="p2-semantics.html#representations" class="smpl">selected representation</a>, such as CONNECT, OPTIONS, or TRACE.
1489            </p>
1490         </div>
1491         <div id="rfc.section.5.p.3">
1492            <p>Conditional request header fields that are defined by extensions to HTTP might place
1493               conditions on all recipients, on the state of the target resource in general, or on
1494               a group of resources. For instance, the "If" header field in WebDAV can make a request
1495               conditional on various aspects of multiple resources, such as locks, if the recipient
1496               understands and implements that field (<a href="#RFC4918" id="rfc.xref.RFC4918.2"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a>, <a href="">Section 10.4</a>).
1497            </p>
1498         </div>
1499         <div id="rfc.section.5.p.4">
1500            <p>Although conditional request header fields are defined as being usable with the HEAD
1501               method (to keep HEAD's semantics consistent with those of GET), there is no point
1502               in sending a conditional HEAD because a successful response is around the same size
1503               as a <a href="#status.304" class="smpl">304 (Not Modified)</a> response and more useful than a <a href="#status.412" class="smpl">412 (Precondition Failed)</a> response.
1504            </p>
1505         </div>
1506      </div>
1507      <div id="precedence">
1508         <h2 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#precedence">Precedence</a></h2>
1509         <div id="rfc.section.6.p.1">
1510            <p>When more than one conditional request header field is present in a request, the order
1511               in which the fields are evaluated becomes important. In practice, the fields defined
1512               in this document are consistently implemented in a single, logical order, since "lost
1513               update" preconditions have more strict requirements than cache validation, a validated
1514               cache is more efficient than a partial response, and entity tags are presumed to be
1515               more accurate than date validators.
1516            </p>
1517         </div>
1518         <div id="rfc.section.6.p.2">
1519            <p>A recipient cache or origin server <em class="bcp14">MUST</em> evaluate the request preconditions defined by this specification in the following
1520               order:
1521            </p>
1522            <ol>
1523               <li id="precedence1">When recipient is the origin server and <a href="#header.if-match" class="smpl">If-Match</a> is present, evaluate the <a href="#header.if-match" class="smpl">If-Match</a> precondition:
1524                  <ul>
1525                     <li>if true, continue to step <a href="#precedence3">3</a></li>
1526                     <li>if false, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a> unless it can be determined that the state-changing request has already succeeded
1527                        (see <a href="#header.if-match" id="rfc.xref.header.if-match.1" title="If-Match">Section&nbsp;3.1</a>)
1528                     </li>
1529                  </ul>
1530               </li>
1531               <li id="precedence2">When recipient is the origin server, <a href="#header.if-match" class="smpl">If-Match</a> is not present, and <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> is present, evaluate the <a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> precondition:
1532                  <ul>
1533                     <li>if true, continue to step <a href="#precedence3">3</a></li>
1534                     <li>if false, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a> unless it can be determined that the state-changing request has already succeeded
1535                        (see <a href="#header.if-unmodified-since" id="rfc.xref.header.if-unmodified-since.1" title="If-Unmodified-Since">Section&nbsp;3.4</a>)
1536                     </li>
1537                  </ul>
1538               </li>
1539               <li id="precedence3">When <a href="#header.if-none-match" class="smpl">If-None-Match</a> is present, evaluate the <a href="#header.if-none-match" class="smpl">If-None-Match</a> precondition:
1540                  <ul>
1541                     <li>if true, continue to step <a href="#precedence5">5</a></li>
1542                     <li>if false for GET/HEAD, respond <a href="#status.304" class="smpl">304 (Not Modified)</a></li>
1543                     <li>if false for other methods, respond <a href="#status.412" class="smpl">412 (Precondition Failed)</a></li>
1544                  </ul>
1545               </li>
1546               <li id="precedence4">When the method is GET or HEAD, <a href="#header.if-none-match" class="smpl">If-None-Match</a> is not present, and <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> is present, evaluate the <a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> precondition:
1547                  <ul>
1548                     <li>if true, continue to step <a href="#precedence5">5</a></li>
1549                     <li>if false, respond <a href="#status.304" class="smpl">304 (Not Modified)</a></li>
1550                  </ul>
1551               </li>
1552               <li id="precedence5">When the method is GET and both <a href="p5-range.html#header.range" class="smpl">Range</a> and <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> are present, evaluate the <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> precondition:
1553                  <ul>
1554                     <li>if the validator matches and the Range specification is applicable to the selected
1555                        representation, respond <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a> <a href="#RFC7233" id="rfc.xref.RFC7233.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[RFC7233]</cite></a></li>
1556                  </ul>
1557               </li>
1558               <li id="precedencelast">Otherwise,
1559                  <ul>
1560                     <li>all conditions are met, so perform the requested action and respond according to its
1561                        success or failure.
1562                     </li>
1563                  </ul>
1564               </li>
1565            </ol>
1566         </div>
1567         <div id="rfc.section.6.p.3">
1568            <p>Any extension to HTTP/1.1 that defines additional conditional request header fields
1569               ought to define its own expectations regarding the order for evaluating such fields
1570               in relation to those defined in this document and other conditionals that might be
1571               found in practice.
1572            </p>
1573         </div>
1574      </div>
1575      <div id="IANA.considerations">
1576         <h2 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a href="#IANA.considerations">IANA Considerations</a></h2>
1577         <div id="status.code.registration">
1578            <h3 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a>&nbsp;<a href="#status.code.registration">Status Code Registration</a></h3>
1579            <div id="rfc.section.7.1.p.1" class="avoidbreakafter">
1580               <p>The "Hypertext Transfer Protocol (HTTP) Status Code Registry" located at &lt;<a href=""></a>&gt; has been updated with the registrations below:
1581               </p>
1582            </div>
1583            <div id="rfc.table.1">
1584               <div id="iana.status.code.registration.table"></div>
1585               <table class="tt full tleft" cellpadding="3" cellspacing="0">
1586                  <thead>
1587                     <tr>
1588                        <th>Value</th>
1589                        <th>Description</th>
1590                        <th>Reference</th>
1591                     </tr>
1592                  </thead>
1593                  <tbody>
1594                     <tr>
1595                        <td class="left">304</td>
1596                        <td class="left">Not Modified</td>
1597                        <td class="left"><a href="#status.304" id="rfc.xref.status.304.1" title="304 Not Modified">Section&nbsp;4.1</a>
1598                        </td>
1599                     </tr>
1600                     <tr>
1601                        <td class="left">412</td>
1602                        <td class="left">Precondition Failed</td>
1603                        <td class="left"><a href="#status.412" id="rfc.xref.status.412.1" title="412 Precondition Failed">Section&nbsp;4.2</a>
1604                        </td>
1605                     </tr>
1606                  </tbody>
1607               </table>
1608            </div>
1609         </div>
1610         <div id="header.field.registration">
1611            <h3 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a>&nbsp;<a href="#header.field.registration">Header Field Registration</a></h3>
1612            <div id="rfc.section.7.2.p.1">
1613               <p>HTTP header fields are registered within the "Message Headers" registry maintained
1614                  at &lt;<a href=""></a>&gt;.
1615               </p>
1616            </div>
1617            <div id="rfc.section.7.2.p.2" class="avoidbreakafter">
1618               <p>This document defines the following HTTP header fields, so their associated registry
1619                  entries have been updated according to the permanent registrations below (see <a href="#BCP90" id="rfc.xref.BCP90.1"><cite title="Registration Procedures for Message Header Fields">[BCP90]</cite></a>):
1620               </p>
1621            </div>
1622            <div id="rfc.table.2">
1623               <div id="iana.header.registration.table"></div>
1624               <table class="tt full tleft" cellpadding="3" cellspacing="0">
1625                  <thead>
1626                     <tr>
1627                        <th>Header Field Name</th>
1628                        <th>Protocol</th>
1629                        <th>Status</th>
1630                        <th>Reference</th>
1631                     </tr>
1632                  </thead>
1633                  <tbody>
1634                     <tr>
1635                        <td class="left">ETag</td>
1636                        <td class="left">http</td>
1637                        <td class="left">standard</td>
1638                        <td class="left"><a href="#header.etag" id="rfc.xref.header.etag.2" title="ETag">Section&nbsp;2.3</a>
1639                        </td>
1640                     </tr>
1641                     <tr>
1642                        <td class="left">If-Match</td>
1643                        <td class="left">http</td>
1644                        <td class="left">standard</td>
1645                        <td class="left"><a href="#header.if-match" id="rfc.xref.header.if-match.2" title="If-Match">Section&nbsp;3.1</a>
1646                        </td>
1647                     </tr>
1648                     <tr>
1649                        <td class="left">If-Modified-Since</td>
1650                        <td class="left">http</td>
1651                        <td class="left">standard</td>
1652                        <td class="left"><a href="#header.if-modified-since" id="rfc.xref.header.if-modified-since.1" title="If-Modified-Since">Section&nbsp;3.3</a>
1653                        </td>
1654                     </tr>
1655                     <tr>
1656                        <td class="left">If-None-Match</td>
1657                        <td class="left">http</td>
1658                        <td class="left">standard</td>
1659                        <td class="left"><a href="#header.if-none-match" id="rfc.xref.header.if-none-match.1" title="If-None-Match">Section&nbsp;3.2</a>
1660                        </td>
1661                     </tr>
1662                     <tr>
1663                        <td class="left">If-Unmodified-Since</td>
1664                        <td class="left">http</td>
1665                        <td class="left">standard</td>
1666                        <td class="left"><a href="#header.if-unmodified-since" id="rfc.xref.header.if-unmodified-since.2" title="If-Unmodified-Since">Section&nbsp;3.4</a>
1667                        </td>
1668                     </tr>
1669                     <tr>
1670                        <td class="left">Last-Modified</td>
1671                        <td class="left">http</td>
1672                        <td class="left">standard</td>
1673                        <td class="left"><a href="#header.last-modified" id="rfc.xref.header.last-modified.2" title="Last-Modified">Section&nbsp;2.2</a>
1674                        </td>
1675                     </tr>
1676                  </tbody>
1677               </table>
1678            </div>
1679            <div id="rfc.section.7.2.p.3">
1680               <p>The change controller is: "IETF ( - Internet Engineering Task Force".</p>
1681            </div>
1682         </div>
1683      </div>
1684      <div id="security.considerations">
1685         <h2 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#security.considerations">Security Considerations</a></h2>
1686         <div id="rfc.section.8.p.1">
1687            <p>This section is meant to inform developers, information providers, and users of known
1688               security concerns specific to the HTTP conditional request mechanisms. More general
1689               security considerations are addressed in HTTP "Message Syntax and Routing" <a href="#RFC7230" id="rfc.xref.RFC7230.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a> and "Semantics and Content" <a href="#RFC7231" id="rfc.xref.RFC7231.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>.
1690            </p>
1691         </div>
1692         <div id="rfc.section.8.p.2">
1693            <p>The validators defined by this specification are not intended to ensure the validity
1694               of a representation, guard against malicious changes, or detect man-in-the-middle
1695               attacks. At best, they enable more efficient cache updates and optimistic concurrent
1696               writes when all participants are behaving nicely. At worst, the conditions will fail
1697               and the client will receive a response that is no more harmful than an HTTP exchange
1698               without conditional requests.
1699            </p>
1700         </div>
1701         <div id="rfc.section.8.p.3">
1702            <p>An entity-tag can be abused in ways that create privacy risks. For example, a site
1703               might deliberately construct a semantically invalid entity-tag that is unique to the
1704               user or user agent, send it in a cacheable response with a long freshness time, and
1705               then read that entity-tag in later conditional requests as a means of re-identifying
1706               that user or user agent. Such an identifying tag would become a persistent identifier
1707               for as long as the user agent retained the original cache entry. User agents that
1708               cache representations ought to ensure that the cache is cleared or replaced whenever
1709               the user performs privacy-maintaining actions, such as clearing stored cookies or
1710               changing to a private browsing mode.
1711            </p>
1712         </div>
1713      </div>
1714      <div id="acks">
1715         <h2 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;<a href="#acks">Acknowledgments</a></h2>
1716         <div id="rfc.section.9.p.1">
1717            <p>See <a href="p1-messaging.html#acks" title="Acknowledgments">Section 10</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.
1718            </p>
1719         </div>
1720      </div>
1721      <h2 id="rfc.references"><a id="rfc.section.10" href="#rfc.section.10">10.</a> References
1722      </h2>
1723      <h3 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References
1724      </h3>
1725      <dl class="reference">
1726         <dt id="RFC2119">[RFC2119]</dt>
1727         <dd>Bradner, S., “<a href="">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
1728         </dd>
1729         <dt id="RFC5234">[RFC5234]</dt>
1730         <dd>Crocker, D., Ed. and P. Overell, “<a href="">Augmented BNF for Syntax Specifications: ABNF</a>”, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.
1731         </dd>
1732         <dt id="RFC7230">[RFC7230]</dt>
1733         <dd>Fielding, R., Ed. and J. Reschke, Ed., “<a href="">Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p1-messaging-latest (work in progress), June&nbsp;2014.
1734         </dd>
1735         <dt id="RFC7231">[RFC7231]</dt>
1736         <dd>Fielding, R., Ed. and J. Reschke, Ed., “<a href="">Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p2-semantics-latest (work in progress), June&nbsp;2014.
1737         </dd>
1738         <dt id="RFC7233">[RFC7233]</dt>
1739         <dd>Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “<a href="">Hypertext Transfer Protocol (HTTP/1.1): Range Requests</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p5-range-latest (work in progress), June&nbsp;2014.
1740         </dd>
1741         <dt id="RFC7234">[RFC7234]</dt>
1742         <dd>Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “<a href="">Hypertext Transfer Protocol (HTTP/1.1): Caching</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p6-cache-latest (work in progress), June&nbsp;2014.
1743         </dd>
1744      </dl>
1745      <h3 id="rfc.references.2"><a href="#rfc.section.10.2" id="rfc.section.10.2">10.2</a> Informative References
1746      </h3>
1747      <dl class="reference">
1748         <dt id="BCP90">[BCP90]</dt>
1749         <dd>Klyne, G., Nottingham, M., and J. Mogul, “<a href="">Registration Procedures for Message Header Fields</a>”, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.
1750         </dd>
1751         <dt id="RFC2616">[RFC2616]</dt>
1752         <dd>Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “<a href="">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
1753         </dd>
1754         <dt id="RFC4918">[RFC4918]</dt>
1755         <dd>Dusseault, L., Ed., “<a href="">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>”, RFC&nbsp;4918, June&nbsp;2007.
1756         </dd>
1757      </dl>
1758      <div id="changes.from.rfc.2616">
1759         <h2 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></h2>
1760         <div id="rfc.section.A.p.1">
1761            <p>The definition of validator weakness has been expanded and clarified. (<a href="#weak.and.strong.validators" title="Weak versus Strong">Section&nbsp;2.1</a>)
1762            </p>
1763         </div>
1764         <div id="rfc.section.A.p.2">
1765            <p>Weak entity-tags are now allowed in all requests except range requests. (Sections <a href="#weak.and.strong.validators" title="Weak versus Strong">2.1</a> and <a href="#header.if-none-match" id="rfc.xref.header.if-none-match.2" title="If-None-Match">3.2</a>)
1766            </p>
1767         </div>
1768         <div id="rfc.section.A.p.3">
1769            <p>The <a href="#header.etag" class="smpl">ETag</a> header field ABNF has been changed to not use quoted-string, thus avoiding escaping
1770               issues. (<a href="#header.etag" id="rfc.xref.header.etag.3" title="ETag">Section&nbsp;2.3</a>)
1771            </p>
1772         </div>
1773         <div id="rfc.section.A.p.4">
1774            <p>ETag is defined to provide an entity tag for the selected representation, thereby
1775               clarifying what it applies to in various situations (such as a PUT response). (<a href="#header.etag" id="rfc.xref.header.etag.4" title="ETag">Section&nbsp;2.3</a>)
1776            </p>
1777         </div>
1778         <div id="rfc.section.A.p.5">
1779            <p>The precedence for evaluation of conditional requests has been defined. (<a href="#precedence" title="Precedence">Section&nbsp;6</a>)
1780            </p>
1781         </div>
1782      </div>
1783      <div id="imported.abnf">
1784         <h2 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a href="#imported.abnf">Imported ABNF</a></h2>
1785         <div id="rfc.section.B.p.1">
1786            <p>The following core rules are included by reference, as defined in <a href="">Appendix B.1</a> of <a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal
1787               0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET
1788               (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
1789            </p>
1790         </div>
1791         <div id="rfc.section.B.p.2" class="avoidbreakafter">
1792            <p>The rules below are defined in <a href="#RFC7230" id="rfc.xref.RFC7230.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>:
1793            </p>
1794         </div>
1795         <div id="rfc.figure.u.16"><pre class="inline">  <a href="#imported.abnf" class="smpl">OWS</a>           = &lt;OWS, see <a href="#RFC7230" id="rfc.xref.RFC7230.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.3</a>&gt;
1796  <a href="#imported.abnf" class="smpl">obs-text</a>      = &lt;obs-text, see <a href="#RFC7230" id="rfc.xref.RFC7230.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>, <a href="p1-messaging.html#field.components" title="Field Value Components">Section 3.2.6</a>&gt;
1798         <div id="rfc.section.B.p.3" class="avoidbreakafter">
1799            <p>The rules below are defined in other parts:</p>
1800         </div>
1801         <div id="rfc.figure.u.17"><pre class="inline">  <a href="#imported.abnf" class="smpl">HTTP-date</a>     = &lt;HTTP-date, see <a href="#RFC7231" id="rfc.xref.RFC7231.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="" title="Date/Time Formats">Section</a>&gt;
1803      </div>
1804      <div id="collected.abnf">
1805         <h2 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a href="#collected.abnf">Collected ABNF</a></h2>
1806         <div id="rfc.section.C.p.1">
1807            <p>In the collected ABNF below, list rules are expanded as per <a href="p1-messaging.html#notation" title="Syntax Notation">Section 1.2</a> of <a href="#RFC7230" id="rfc.xref.RFC7230.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>.
1808            </p>
1809         </div>
1810         <div id="rfc.figure.u.18"><pre class="inline"><a href="#header.etag" class="smpl">ETag</a> = entity-tag
1812<a href="#imported.abnf" class="smpl">HTTP-date</a> = &lt;HTTP-date, see [RFC7231], Section;
1814<a href="#header.if-match" class="smpl">If-Match</a> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1815 entity-tag ] ) )
1816<a href="#header.if-modified-since" class="smpl">If-Modified-Since</a> = HTTP-date
1817<a href="#header.if-none-match" class="smpl">If-None-Match</a> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1818 entity-tag ] ) )
1819<a href="#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a> = HTTP-date
1821<a href="#header.last-modified" class="smpl">Last-Modified</a> = HTTP-date
1823<a href="#imported.abnf" class="smpl">OWS</a> = &lt;OWS, see [RFC7230], Section 3.2.3&gt;
1825<a href="#header.etag" class="smpl">entity-tag</a> = [ weak ] opaque-tag
1826<a href="#header.etag" class="smpl">etagc</a> = "!" / %x23-7E ; '#'-'~'
1827 / obs-text
1829<a href="#imported.abnf" class="smpl">obs-text</a> = &lt;obs-text, see [RFC7230], Section 3.2.6&gt;
1830<a href="#header.etag" class="smpl">opaque-tag</a> = DQUOTE *etagc DQUOTE
1832<a href="#header.etag" class="smpl">weak</a> = %x57.2F ; W/
1834      </div>
1835      <h2 id="rfc.index"><a href="#rfc.index">Index</a></h2>
1836      <p class="noprint"><a href="#rfc.index.3">3</a> <a href="#rfc.index.4">4</a> <a href="#rfc.index.B">B</a> <a href="#rfc.index.E">E</a> <a href="#rfc.index.G">G</a> <a href="#rfc.index.I">I</a> <a href="#rfc.index.L">L</a> <a href="#rfc.index.M">M</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.S">S</a> <a href="#rfc.index.V">V</a>
1837      </p>
1838      <div class="print2col">
1839         <ul class="ind">
1840            <li><a id="rfc.index.3" href="#rfc.index.3"><b>3</b></a><ul>
1841                  <li>304 Not Modified (status code)&nbsp;&nbsp;<a href="#rfc.section.4.1"><b>4.1</b></a>, <a href="#rfc.xref.status.304.1">7.1</a></li>
1842               </ul>
1843            </li>
1844            <li><a id="rfc.index.4" href="#rfc.index.4"><b>4</b></a><ul>
1845                  <li>412 Precondition Failed (status code)&nbsp;&nbsp;<a href="#rfc.section.4.2"><b>4.2</b></a>, <a href="#rfc.xref.status.412.1">7.1</a></li>
1846               </ul>
1847            </li>
1848            <li><a id="rfc.index.B" href="#rfc.index.B"><b>B</b></a><ul>
1849                  <li><em>BCP90</em>&nbsp;&nbsp;<a href="#rfc.xref.BCP90.1">7.2</a>, <a href="#BCP90"><b>10.2</b></a></li>
1850               </ul>
1851            </li>
1852            <li><a id="rfc.index.E" href="#rfc.index.E"><b>E</b></a><ul>
1853                  <li>ETag header field&nbsp;&nbsp;<a href="#rfc.xref.header.etag.1">2</a>, <a href="#rfc.section.2.3"><b>2.3</b></a>, <a href="#rfc.xref.header.etag.2">7.2</a>, <a href="#rfc.xref.header.etag.3">A</a>, <a href="#rfc.xref.header.etag.4">A</a></li>
1854               </ul>
1855            </li>
1856            <li><a id="rfc.index.G" href="#rfc.index.G"><b>G</b></a><ul>
1857                  <li><tt>Grammar</tt>&nbsp;&nbsp;
1858                     <ul>
1859                        <li><tt>entity-tag</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.3"><b>2.3</b></a></li>
1860                        <li><tt>ETag</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.2"><b>2.3</b></a></li>
1861                        <li><tt>etagc</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.6"><b>2.3</b></a></li>
1862                        <li><tt>If-Match</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.7"><b>3.1</b></a></li>
1863                        <li><tt>If-Modified-Since</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.9"><b>3.3</b></a></li>
1864                        <li><tt>If-None-Match</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.8"><b>3.2</b></a></li>
1865                        <li><tt>If-Unmodified-Since</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.10"><b>3.4</b></a></li>
1866                        <li><tt>Last-Modified</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.1"><b>2.2</b></a></li>
1867                        <li><tt>opaque-tag</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.5"><b>2.3</b></a></li>
1868                        <li><tt>weak</tt>&nbsp;&nbsp;<a href="#rfc.iref.g.4"><b>2.3</b></a></li>
1869                     </ul>
1870                  </li>
1871               </ul>
1872            </li>
1873            <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul>
1874                  <li>If-Match header field&nbsp;&nbsp;<a href="#rfc.section.3.1"><b>3.1</b></a>, <a href="#rfc.xref.header.if-match.1">6</a>, <a href="#rfc.xref.header.if-match.2">7.2</a></li>
1875                  <li>If-Modified-Since header field&nbsp;&nbsp;<a href="#rfc.section.3.3"><b>3.3</b></a>, <a href="#rfc.xref.header.if-modified-since.1">7.2</a></li>
1876                  <li>If-None-Match header field&nbsp;&nbsp;<a href="#rfc.section.3.2"><b>3.2</b></a>, <a href="#rfc.xref.header.if-none-match.1">7.2</a>, <a href="#rfc.xref.header.if-none-match.2">A</a></li>
1877                  <li>If-Unmodified-Since header field&nbsp;&nbsp;<a href="#rfc.section.3.4"><b>3.4</b></a>, <a href="#rfc.xref.header.if-unmodified-since.1">6</a>, <a href="#rfc.xref.header.if-unmodified-since.2">7.2</a></li>
1878               </ul>
1879            </li>
1880            <li><a id="rfc.index.L" href="#rfc.index.L"><b>L</b></a><ul>
1881                  <li>Last-Modified header field&nbsp;&nbsp;<a href="#rfc.xref.header.last-modified.1">2</a>, <a href="#rfc.section.2.2"><b>2.2</b></a>, <a href="#rfc.xref.header.last-modified.2">7.2</a></li>
1882               </ul>
1883            </li>
1884            <li><a id="rfc.index.M" href="#rfc.index.M"><b>M</b></a><ul>
1885                  <li>metadata&nbsp;&nbsp;<a href="#rfc.section.2"><b>2</b></a></li>
1886               </ul>
1887            </li>
1888            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
1889                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">1.1</a>, <a href="#RFC2119"><b>10.1</b></a></li>
1890                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">2.3</a>, <a href="#RFC2616"><b>10.2</b></a><ul>
1891                        <li><em>Section 3.11</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">2.3</a></li>
1892                     </ul>
1893                  </li>
1894                  <li><em>RFC4918</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC4918.1">2</a>, <a href="#rfc.xref.RFC4918.2">5</a>, <a href="#RFC4918"><b>10.2</b></a><ul>
1895                        <li><em>Section 10.4</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC4918.2">5</a></li>
1896                     </ul>
1897                  </li>
1898                  <li><em>RFC5234</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5234.1">1.2</a>, <a href="#RFC5234"><b>10.1</b></a>, <a href="#rfc.xref.RFC5234.2">B</a><ul>
1899                        <li><em>Appendix B.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5234.2">B</a></li>
1900                     </ul>
1901                  </li>
1902                  <li><em>RFC7230</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.1">1</a>, <a href="#rfc.xref.RFC7230.2">1.1</a>, <a href="#rfc.xref.RFC7230.3">1.2</a>, <a href="#rfc.xref.RFC7230.4">2.3.3</a>, <a href="#rfc.xref.RFC7230.5">8</a>, <a href="#rfc.xref.RFC7230.6">9</a>, <a href="#RFC7230"><b>10.1</b></a>, <a href="#rfc.xref.RFC7230.7">B</a>, <a href="#rfc.xref.RFC7230.8">B</a>, <a href="#rfc.xref.RFC7230.9">B</a>, <a href="#rfc.xref.RFC7230.10">C</a><ul>
1903                        <li><em>Section 1.2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.10">C</a></li>
1904                        <li><em>Section 2.5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.2">1.1</a></li>
1905                        <li><em>Section 3.2.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.8">B</a></li>
1906                        <li><em>Section 3.2.6</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.9">B</a></li>
1907                        <li><em>Section 4</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.4">2.3.3</a></li>
1908                        <li><em>Section 7</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.3">1.2</a></li>
1909                        <li><em>Section 10</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7230.6">9</a></li>
1910                     </ul>
1911                  </li>
1912                  <li><em>RFC7231</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7231.1">1</a>, <a href="#rfc.xref.RFC7231.2">1</a>, <a href="#rfc.xref.RFC7231.3">2.3.3</a>, <a href="#rfc.xref.RFC7231.4">2.3.3</a>, <a href="#rfc.xref.RFC7231.5">3.2</a>, <a href="#rfc.xref.RFC7231.6">8</a>, <a href="#RFC7231"><b>10.1</b></a>, <a href="#rfc.xref.RFC7231.7">B</a><ul>
1913                        <li><em>Section 3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7231.2">1</a></li>
1914                        <li><em>Section 3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7231.3">2.3.3</a></li>
1915                        <li><em>Section 4.2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7231.5">3.2</a></li>
1916                        <li><em>Section 5.3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7231.4">2.3.3</a></li>
1917                        <li><em>Section</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7231.7">B</a></li>
1918                     </ul>
1919                  </li>
1920                  <li><em>RFC7233</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7233.1">3.5</a>, <a href="#rfc.xref.RFC7233.2">6</a>, <a href="#RFC7233"><b>10.1</b></a><ul>
1921                        <li><em>Section 3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7233.1">3.5</a></li>
1922                     </ul>
1923                  </li>
1924                  <li><em>RFC7234</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7234.1">1</a>, <a href="#rfc.xref.RFC7234.2">2.2.1</a>, <a href="#rfc.xref.RFC7234.3">2.3.1</a>, <a href="#rfc.xref.RFC7234.4">3.2</a>, <a href="#rfc.xref.RFC7234.5">3.3</a>, <a href="#rfc.xref.RFC7234.6">4.1</a>, <a href="#RFC7234"><b>10.1</b></a><ul>
1925                        <li><em>Section 4.3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7234.4">3.2</a>, <a href="#rfc.xref.RFC7234.5">3.3</a></li>
1926                        <li><em>Section 4.3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC7234.6">4.1</a></li>
1927                     </ul>
1928                  </li>
1929               </ul>
1930            </li>
1931            <li><a id="rfc.index.S" href="#rfc.index.S"><b>S</b></a><ul>
1932                  <li>selected representation&nbsp;&nbsp;<a href="#rfc.iref.s.1"><b>1</b></a></li>
1933               </ul>
1934            </li>
1935            <li><a id="rfc.index.V" href="#rfc.index.V"><b>V</b></a><ul>
1936                  <li>validator&nbsp;&nbsp;<a href="#rfc.section.2"><b>2</b></a><ul>
1937                        <li>strong&nbsp;&nbsp;<a href="#rfc.section.2.1"><b>2.1</b></a></li>
1938                        <li>weak&nbsp;&nbsp;<a href="#rfc.section.2.1"><b>2.1</b></a></li>
1939                     </ul>
1940                  </li>
1941               </ul>
1942            </li>
1943         </ul>
1944      </div>
1945      <div class="avoidbreakinside">
1946         <h2 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h2>
1947         <p><b>Roy T. Fielding</b>
1948            (editor)
1949            <br>Adobe Systems Incorporated<br>345 Park Ave<br>San Jose, CA&nbsp;95110<br>USA<br>Email:<br>URI: <a href=""></a></p>
1950         <p><b>Julian F. Reschke</b>
1951            (editor)
1952            <br>greenbytes GmbH<br>Hafenweg 16<br>Muenster, NW&nbsp;48155<br>Germany<br>Email:<br>URI: <a href=""></a></p>
1953      </div>
1954   </body>
Note: See TracBrowser for help on using the repository browser.