source: draft-ietf-httpbis/latest/p3-payload.html @ 1589

Last change on this file since 1589 was 1587, checked in by fielding@…, 8 years ago

updated refs in abnf inclusions

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html;charset=utf-8
File size: 182.1 KB
RevLine 
[52]1<!DOCTYPE html
2  PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html lang="en">
[573]4   <head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
[52]5      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
[1522]6      <title>HTTP/1.1, part 3: Message Payload and Content Negotiation</title><script>
7var buttonsAdded = false;
8
9function init() {
10  var fb = document.createElement("div");
[1528]11  fb.className = "feedback noprint";
[1522]12  fb.setAttribute("onclick", "feedback();");
13  fb.appendChild(document.createTextNode("feedback"));
14
15  var bodyl = document.getElementsByTagName("body");
16  bodyl.item(0).appendChild(fb);
17}
18
19function feedback() {
20  toggleButtonsToElementsByName("h1");
21  toggleButtonsToElementsByName("h2");
22  toggleButtonsToElementsByName("h3");
23  toggleButtonsToElementsByName("h4");
24 
25  buttonsAdded = !buttonsAdded;
26}
27
28function toggleButtonsToElementsByName(name) {
29  var list = document.getElementsByTagName(name);
30  for (var i = 0; i < list.length; i++) {
31    toggleButton(list.item(i));
32  }
33}
34
35function toggleButton(node) {
36  if (! buttonsAdded) {
37 
38    // docname
39    var template = "mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&body=<{ref}>:";
40
41    var id = node.getAttribute("id");
42    // better id available?
43    var titlelinks = node.getElementsByTagName("a");
44    for (var i = 0; i < titlelinks.length; i++) {
45      var tl = titlelinks.item(i);
46      if (tl.getAttribute("id")) {
47        id = tl.getAttribute("id");
48      }
49    }
50
51    // ref
52    var ref = window.location.toString();
53    var hash = ref.indexOf("#");
54    if (hash != -1) {
55      ref = ref.substring(0, hash);
56    }
57    if (id != "") {
58      ref += "#" + id;
59    }
60   
61    // docname
62    var docname = "draft-ietf-httpbis-p3-payload-latest";
63
64    // section
65    var section = node.textContent;
[1528]66    section = section.replace("\u00a0", " ");
[1522]67   
68    // build URI from template
69    var uri = template.replace("{docname}", encodeURIComponent(docname));
70    uri = uri.replace("{section}", encodeURIComponent(section));
71    uri = uri.replace("{ref}", encodeURIComponent(ref));
72 
73    var button = document.createElement("a");
[1528]74    button.className = "fbbutton noprint";
[1522]75    button.setAttribute("href", uri);
76    button.appendChild(document.createTextNode("send feedback"));
77    node.appendChild(button);
78  }
79  else {
80    var buttons = node.getElementsByTagName("a");
81    for (var i = 0; i < buttons.length; i++) {
82      var b = buttons.item(i);
[1528]83      if (b.className == "fbbutton noprint") {
[1522]84        node.removeChild(b);
85      }
86    }
87  }
88}</script><style type="text/css" title="Xml2Rfc (sans serif)">
[52]89a {
90  text-decoration: none;
91}
92a.smpl {
93  color: black;
94}
95a:hover {
96  text-decoration: underline;
97}
98a:active {
99  text-decoration: underline;
100}
101address {
102  margin-top: 1em;
103  margin-left: 2em;
104  font-style: normal;
105}
106body {
107  color: black;
108  font-family: verdana, helvetica, arial, sans-serif;
109  font-size: 10pt;
110}
111cite {
112  font-style: normal;
113}
[563]114div.note {
115  margin-left: 2em;
116}
[52]117dd {
118  margin-right: 2em;
119}
120dl {
121  margin-left: 2em;
122}
123
[729]124ul.empty {
125  list-style-type: none;
126}
127ul.empty li {
[52]128  margin-top: .5em;
129}
130dl p {
131  margin-left: 0em;
132}
133dt {
134  margin-top: .5em;
135}
136h1 {
137  font-size: 14pt;
138  line-height: 21pt;
139  page-break-after: avoid;
140}
141h1.np {
142  page-break-before: always;
143}
144h1 a {
145  color: #333333;
146}
147h2 {
148  font-size: 12pt;
149  line-height: 15pt;
150  page-break-after: avoid;
151}
[446]152h3, h4, h5, h6 {
[52]153  font-size: 10pt;
154  page-break-after: avoid;
155}
[446]156h2 a, h3 a, h4 a, h5 a, h6 a {
[52]157  color: black;
158}
159img {
160  margin-left: 3em;
161}
162li {
163  margin-left: 2em;
164  margin-right: 2em;
165}
166ol {
167  margin-left: 2em;
168  margin-right: 2em;
169}
[1145]170ol.la {
171  list-style-type: lower-alpha;
172}
173ol.ua {
174  list-style-type: upper-alpha;
175}
[52]176ol p {
177  margin-left: 0em;
178}
179p {
180  margin-left: 2em;
181  margin-right: 2em;
182}
183pre {
184  margin-left: 3em;
185  background-color: lightyellow;
186  padding: .25em;
187}
188pre.text2 {
189  border-style: dotted;
190  border-width: 1px;
191  background-color: #f0f0f0;
192  width: 69em;
193}
194pre.inline {
195  background-color: white;
196  padding: 0em;
197}
198pre.text {
199  border-style: dotted;
200  border-width: 1px;
201  background-color: #f8f8f8;
202  width: 69em;
203}
204pre.drawing {
205  border-style: solid;
206  border-width: 1px;
207  background-color: #f8f8f8;
208  padding: 2em;
209}
210table {
211  margin-left: 2em;
212}
[253]213table.tt {
214  vertical-align: top;
215}
216table.full {
217  border-style: outset;
218  border-width: 1px;
219}
220table.headers {
221  border-style: outset;
222  border-width: 1px;
223}
224table.tt td {
225  vertical-align: top;
226}
227table.full td {
228  border-style: inset;
229  border-width: 1px;
230}
231table.tt th {
232  vertical-align: top;
233}
234table.full th {
235  border-style: inset;
236  border-width: 1px;
237}
238table.headers th {
239  border-style: none none inset none;
240  border-width: 1px;
241}
[663]242table.left {
243  margin-right: auto;
244}
245table.right {
246  margin-left: auto;
247}
248table.center {
249  margin-left: auto;
250  margin-right: auto;
251}
[454]252caption {
253  caption-side: bottom;
254  font-weight: bold;
255  font-size: 9pt;
256  margin-top: .5em;
257}
258
[52]259table.header {
[729]260  border-spacing: 1px;
[52]261  width: 95%;
262  font-size: 10pt;
263  color: white;
264}
265td.top {
266  vertical-align: top;
267}
268td.topnowrap {
269  vertical-align: top;
270  white-space: nowrap; 
271}
[729]272table.header td {
[52]273  background-color: gray;
274  width: 50%;
275}
[729]276table.header a {
[227]277  color: white;
278}
[52]279td.reference {
280  vertical-align: top;
281  white-space: nowrap;
282  padding-right: 1em;
283}
284thead {
285  display:table-header-group;
286}
[1072]287ul.toc, ul.toc ul {
[52]288  list-style: none;
289  margin-left: 1.5em;
290  margin-right: 0em;
291  padding-left: 0em;
292}
[1072]293ul.toc li {
[52]294  line-height: 150%;
295  font-weight: bold;
296  font-size: 10pt;
297  margin-left: 0em;
298  margin-right: 0em;
299}
[1072]300ul.toc li li {
[52]301  line-height: normal;
302  font-weight: normal;
303  font-size: 9pt;
304  margin-left: 0em;
305  margin-right: 0em;
306}
[1072]307li.excluded {
[52]308  font-size: 0pt;
309}
310ul p {
311  margin-left: 0em;
312}
[1095]313ul.ind, ul.ind ul {
[52]314  list-style: none;
315  margin-left: 1.5em;
316  margin-right: 0em;
317  padding-left: 0em;
[440]318  page-break-before: avoid;
[52]319}
[1072]320ul.ind li {
[52]321  font-weight: bold;
322  line-height: 200%;
323  margin-left: 0em;
324  margin-right: 0em;
325}
[1072]326ul.ind li li {
[52]327  font-weight: normal;
328  line-height: 150%;
329  margin-left: 0em;
330  margin-right: 0em;
331}
[662]332.avoidbreak {
333  page-break-inside: avoid;
334}
[52]335.bcp14 {
336  font-style: normal;
337  text-transform: lowercase;
338  font-variant: small-caps;
339}
340.comment {
341  background-color: yellow;
342}
343.center {
344  text-align: center;
345}
346.error {
347  color: red;
348  font-style: italic;
349  font-weight: bold;
350}
351.figure {
352  font-weight: bold;
353  text-align: center;
354  font-size: 9pt;
355}
356.filename {
357  color: #333333;
358  font-weight: bold;
359  font-size: 12pt;
360  line-height: 21pt;
361  text-align: center;
362}
363.fn {
364  font-weight: bold;
365}
366.hidden {
367  display: none;
368}
369.left {
370  text-align: left;
371}
372.right {
373  text-align: right;
374}
375.title {
376  color: #990000;
377  font-size: 18pt;
378  line-height: 18pt;
379  font-weight: bold;
380  text-align: center;
381  margin-top: 36pt;
382}
383.vcardline {
384  display: block;
385}
386.warning {
387  font-size: 14pt;
388  background-color: yellow;
389}
[1522]390.feedback {
391  position: fixed;
392  bottom: 1%;
393  right: 1%;
394  padding: 3px 5px;
395  color: white;
396  border-radius: 5px;
397  background: #a00000;
398  border: 1px solid silver;
399}
400.fbbutton {
401  margin-left: 1em;
402  color: #303030;
403  font-size: small;
404  font-weight: normal;
405  background: #d0d000;
406  padding: 1px 4px;
407  border: 1px solid silver;
408  border-radius: 5px;
409}
[52]410
411@media print {
412  .noprint {
413    display: none;
414  }
415 
416  a {
417    color: black;
418    text-decoration: none;
419  }
420
421  table.header {
422    width: 90%;
423  }
424
425  td.header {
426    width: 50%;
427    color: black;
428    background-color: white;
429    vertical-align: top;
430    font-size: 12pt;
431  }
432
433  ul.toc a::after {
434    content: leader('.') target-counter(attr(href), page);
435  }
436 
[1072]437  ul.ind li li a {
[52]438    content: target-counter(attr(href), page);
439  }
440 
441  .print2col {
442    column-count: 2;
[1528]443    -moz-column-count: 2;
[52]444    column-fill: auto;
445  }
446}
447
448@page {
449  @top-left {
[754]450       content: "Internet-Draft"; 
[52]451  } 
452  @top-right {
[1552]453       content: "March 2012"; 
[52]454  } 
455  @top-center {
[120]456       content: "HTTP/1.1, Part 3"; 
[52]457  } 
458  @bottom-left {
459       content: "Fielding, et al."; 
460  } 
461  @bottom-center {
[1586]462       content: "Expires September 12, 2012"; 
[52]463  } 
464  @bottom-right {
465       content: "[Page " counter(page) "]"; 
466  } 
467}
468
469@page:first { 
470    @top-left {
471      content: normal;
472    }
473    @top-right {
474      content: normal;
475    }
476    @top-center {
477      content: normal;
478    }
479}
480</style><link rel="Contents" href="#rfc.toc">
481      <link rel="Author" href="#rfc.authors">
[754]482      <link rel="Copyright" href="#rfc.copyrightnotice">
[52]483      <link rel="Index" href="#rfc.index">
484      <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
[424]485      <link rel="Chapter" title="2 Protocol Parameters" href="#rfc.section.2">
[966]486      <link rel="Chapter" title="3 Payload" href="#rfc.section.3">
487      <link rel="Chapter" title="4 Representation" href="#rfc.section.4">
488      <link rel="Chapter" title="5 Content Negotiation" href="#rfc.section.5">
489      <link rel="Chapter" title="6 Header Field Definitions" href="#rfc.section.6">
490      <link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7">
491      <link rel="Chapter" title="8 Security Considerations" href="#rfc.section.8">
492      <link rel="Chapter" title="9 Acknowledgments" href="#rfc.section.9">
493      <link rel="Chapter" href="#rfc.section.10" title="10 References">
[875]494      <link rel="Appendix" title="A Differences between HTTP and MIME" href="#rfc.section.A">
[52]495      <link rel="Appendix" title="B Additional Features" href="#rfc.section.B">
[912]496      <link rel="Appendix" title="C Changes from RFC 2616" href="#rfc.section.C">
[421]497      <link rel="Appendix" title="D Collected ABNF" href="#rfc.section.D">
498      <link rel="Appendix" title="E Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.E">
[1472]499      <link href="p2-semantics.html" rel="prev">
500      <link href="p4-conditional.html" rel="next">
[1552]501      <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.570, 2012-02-13 19:17:35, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
[754]502      <link rel="schema.dct" href="http://purl.org/dc/terms/">
503      <meta name="dct.creator" content="Fielding, R.">
504      <meta name="dct.creator" content="Lafon, Y.">
505      <meta name="dct.creator" content="Reschke, J. F.">
506      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p3-payload-latest">
[1586]507      <meta name="dct.issued" scheme="ISO8601" content="2012-03-11">
[754]508      <meta name="dct.replaces" content="urn:ietf:rfc:2616">
[1373]509      <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 3 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 3 defines HTTP message content, metadata, and content negotiation.">
510      <meta name="description" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 3 of the seven-part specification that defines the protocol referred to as &#34;HTTP/1.1&#34; and, taken together, obsoletes RFC 2616. Part 3 defines HTTP message content, metadata, and content negotiation.">
[52]511   </head>
[1522]512   <body onload="init();">
[729]513      <table class="header">
514         <tbody>
515            <tr>
516               <td class="left">HTTPbis Working Group</td>
517               <td class="right">R. Fielding, Editor</td>
518            </tr>
519            <tr>
[754]520               <td class="left">Internet-Draft</td>
[1106]521               <td class="right">Adobe</td>
[729]522            </tr>
523            <tr>
[741]524               <td class="left">Obsoletes: <a href="http://tools.ietf.org/html/rfc2616">2616</a> (if approved)
[729]525               </td>
[1586]526               <td class="right">Y. Lafon, Editor</td>
[729]527            </tr>
528            <tr>
[741]529               <td class="left">Intended status: Standards Track</td>
[729]530               <td class="right">W3C</td>
531            </tr>
532            <tr>
[1586]533               <td class="left">Expires: September 12, 2012</td>
[832]534               <td class="right">J. Reschke, Editor</td>
[729]535            </tr>
536            <tr>
537               <td class="left"></td>
538               <td class="right">greenbytes</td>
539            </tr>
540            <tr>
541               <td class="left"></td>
[1586]542               <td class="right">March 11, 2012</td>
[729]543            </tr>
544         </tbody>
[52]545      </table>
546      <p class="title">HTTP/1.1, part 3: Message Payload and Content Negotiation<br><span class="filename">draft-ietf-httpbis-p3-payload-latest</span></p>
[723]547      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> 
[1373]548      <p>The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information
[723]549         systems. HTTP has been in use by the World Wide Web global information initiative since 1990. This document is Part 3 of the
[1373]550         seven-part specification that defines the protocol referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616.
551      </p> 
552      <p>Part 3 defines HTTP message content, metadata, and content negotiation.</p> 
[723]553      <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1> 
[1268]554      <p>Discussion of this draft should take place on the HTTPBIS working group mailing list (ietf-http-wg@w3.org), which is archived
555         at &lt;<a href="http://lists.w3.org/Archives/Public/ietf-http-wg/">http://lists.w3.org/Archives/Public/ietf-http-wg/</a>&gt;.
[723]556      </p> 
[1268]557      <p>The current issues list is at &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/report/3">http://tools.ietf.org/wg/httpbis/trac/report/3</a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href="http://tools.ietf.org/wg/httpbis/">http://tools.ietf.org/wg/httpbis/</a>&gt;.
558      </p> 
[1499]559      <p>The changes in this draft are summarized in <a href="#changes.since.18" title="Since draft-ietf-httpbis-p3-payload-18">Appendix&nbsp;E.20</a>.
[723]560      </p> 
[799]561      <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
562      <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
563      <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
564         working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href="http://datatracker.ietf.org/drafts/current/">http://datatracker.ietf.org/drafts/current/</a>.
[52]565      </p>
566      <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
567         documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
568         in progress”.
569      </p>
[1586]570      <p>This Internet-Draft will expire on September 12, 2012.</p>
[446]571      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
[1497]572      <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
[723]573      <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
574         and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
[799]575         text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
576         BSD License.
[446]577      </p>
[723]578      <p>This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November
579         10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to
580         allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s)
581         controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative
582         works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate
583         it into languages other than English.
584      </p>
[52]585      <hr class="noprint">
586      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
587      <ul class="toc">
[1072]588         <li>1.&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a><ul>
589               <li>1.1&nbsp;&nbsp;&nbsp;<a href="#terminology">Terminology</a></li>
[1452]590               <li>1.2&nbsp;&nbsp;&nbsp;<a href="#intro.conformance.and.error.handling">Conformance and Error Handling</a></li>
[1072]591               <li>1.3&nbsp;&nbsp;&nbsp;<a href="#notation">Syntax Notation</a><ul>
592                     <li>1.3.1&nbsp;&nbsp;&nbsp;<a href="#core.rules">Core Rules</a></li>
593                     <li>1.3.2&nbsp;&nbsp;&nbsp;<a href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></li>
[424]594                  </ul>
595               </li>
[96]596            </ul>
597         </li>
[1072]598         <li>2.&nbsp;&nbsp;&nbsp;<a href="#protocol.parameters">Protocol Parameters</a><ul>
[1240]599               <li>2.1&nbsp;&nbsp;&nbsp;<a href="#character.sets">Character Encodings (charset)</a></li>
[1072]600               <li>2.2&nbsp;&nbsp;&nbsp;<a href="#content.codings">Content Codings</a><ul>
601                     <li>2.2.1&nbsp;&nbsp;&nbsp;<a href="#content.coding.registry">Content Coding Registry</a></li>
[670]602                  </ul>
603               </li>
[1072]604               <li>2.3&nbsp;&nbsp;&nbsp;<a href="#media.types">Media Types</a><ul>
605                     <li>2.3.1&nbsp;&nbsp;&nbsp;<a href="#canonicalization.and.text.defaults">Canonicalization and Text Defaults</a></li>
606                     <li>2.3.2&nbsp;&nbsp;&nbsp;<a href="#multipart.types">Multipart Types</a></li>
[52]607                  </ul>
608               </li>
[1072]609               <li>2.4&nbsp;&nbsp;&nbsp;<a href="#language.tags">Language Tags</a></li>
[52]610            </ul>
611         </li>
[1072]612         <li>3.&nbsp;&nbsp;&nbsp;<a href="#payload">Payload</a><ul>
613               <li>3.1&nbsp;&nbsp;&nbsp;<a href="#payload.header.fields">Payload Header Fields</a></li>
614               <li>3.2&nbsp;&nbsp;&nbsp;<a href="#payload.body">Payload Body</a></li>
[52]615            </ul>
616         </li>
[1072]617         <li>4.&nbsp;&nbsp;&nbsp;<a href="#representation">Representation</a><ul>
618               <li>4.1&nbsp;&nbsp;&nbsp;<a href="#representation.header.fields">Representation Header Fields</a></li>
619               <li>4.2&nbsp;&nbsp;&nbsp;<a href="#representation.data">Representation Data</a></li>
[52]620            </ul>
621         </li>
[1072]622         <li>5.&nbsp;&nbsp;&nbsp;<a href="#content.negotiation">Content Negotiation</a><ul>
623               <li>5.1&nbsp;&nbsp;&nbsp;<a href="#server-driven.negotiation">Server-driven Negotiation</a></li>
624               <li>5.2&nbsp;&nbsp;&nbsp;<a href="#agent-driven.negotiation">Agent-driven Negotiation</a></li>
[52]625            </ul>
626         </li>
[1415]627         <li>6.&nbsp;&nbsp;&nbsp;<a href="#header.field.definitions">Header Field Definitions</a><ul>
[1072]628               <li>6.1&nbsp;&nbsp;&nbsp;<a href="#header.accept">Accept</a></li>
629               <li>6.2&nbsp;&nbsp;&nbsp;<a href="#header.accept-charset">Accept-Charset</a></li>
630               <li>6.3&nbsp;&nbsp;&nbsp;<a href="#header.accept-encoding">Accept-Encoding</a></li>
631               <li>6.4&nbsp;&nbsp;&nbsp;<a href="#header.accept-language">Accept-Language</a></li>
632               <li>6.5&nbsp;&nbsp;&nbsp;<a href="#header.content-encoding">Content-Encoding</a></li>
633               <li>6.6&nbsp;&nbsp;&nbsp;<a href="#header.content-language">Content-Language</a></li>
634               <li>6.7&nbsp;&nbsp;&nbsp;<a href="#header.content-location">Content-Location</a></li>
[1267]635               <li>6.8&nbsp;&nbsp;&nbsp;<a href="#header.content-type">Content-Type</a></li>
[253]636            </ul>
637         </li>
[1072]638         <li>7.&nbsp;&nbsp;&nbsp;<a href="#IANA.considerations">IANA Considerations</a><ul>
639               <li>7.1&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
640               <li>7.2&nbsp;&nbsp;&nbsp;<a href="#content.coding.registration">Content Coding Registry</a></li>
[52]641            </ul>
642         </li>
[1072]643         <li>8.&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a><ul>
644               <li>8.1&nbsp;&nbsp;&nbsp;<a href="#privacy.issues.connected.to.accept.header.fields">Privacy Issues Connected to Accept Header Fields</a></li>
[119]645            </ul>
646         </li>
[1364]647         <li>9.&nbsp;&nbsp;&nbsp;<a href="#acks">Acknowledgments</a></li>
[1072]648         <li>10.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
649               <li>10.1&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
650               <li>10.2&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
[966]651            </ul>
652         </li>
[1072]653         <li><a href="#rfc.authors">Authors' Addresses</a></li>
654         <li>A.&nbsp;&nbsp;&nbsp;<a href="#differences.between.http.and.mime">Differences between HTTP and MIME</a><ul>
655               <li>A.1&nbsp;&nbsp;&nbsp;<a href="#mime-version">MIME-Version</a></li>
656               <li>A.2&nbsp;&nbsp;&nbsp;<a href="#conversion.to.canonical.form">Conversion to Canonical Form</a></li>
657               <li>A.3&nbsp;&nbsp;&nbsp;<a href="#conversion.of.date.formats">Conversion of Date Formats</a></li>
658               <li>A.4&nbsp;&nbsp;&nbsp;<a href="#introduction.of.content-encoding">Introduction of Content-Encoding</a></li>
659               <li>A.5&nbsp;&nbsp;&nbsp;<a href="#no.content-transfer-encoding">No Content-Transfer-Encoding</a></li>
660               <li>A.6&nbsp;&nbsp;&nbsp;<a href="#introduction.of.transfer-encoding">Introduction of Transfer-Encoding</a></li>
661               <li>A.7&nbsp;&nbsp;&nbsp;<a href="#mhtml.line.length">MHTML and Line Length Limitations</a></li>
[52]662            </ul>
663         </li>
[1072]664         <li>B.&nbsp;&nbsp;&nbsp;<a href="#additional.features">Additional Features</a></li>
665         <li>C.&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc.2616">Changes from RFC 2616</a></li>
666         <li>D.&nbsp;&nbsp;&nbsp;<a href="#collected.abnf">Collected ABNF</a></li>
667         <li>E.&nbsp;&nbsp;&nbsp;<a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a><ul>
668               <li>E.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.1">Since RFC 2616</a></li>
669               <li>E.2&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.2">Since draft-ietf-httpbis-p3-payload-00</a></li>
670               <li>E.3&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.3">Since draft-ietf-httpbis-p3-payload-01</a></li>
671               <li>E.4&nbsp;&nbsp;&nbsp;<a href="#changes.since.02">Since draft-ietf-httpbis-p3-payload-02</a></li>
672               <li>E.5&nbsp;&nbsp;&nbsp;<a href="#changes.since.03">Since draft-ietf-httpbis-p3-payload-03</a></li>
673               <li>E.6&nbsp;&nbsp;&nbsp;<a href="#changes.since.04">Since draft-ietf-httpbis-p3-payload-04</a></li>
674               <li>E.7&nbsp;&nbsp;&nbsp;<a href="#changes.since.05">Since draft-ietf-httpbis-p3-payload-05</a></li>
675               <li>E.8&nbsp;&nbsp;&nbsp;<a href="#changes.since.06">Since draft-ietf-httpbis-p3-payload-06</a></li>
676               <li>E.9&nbsp;&nbsp;&nbsp;<a href="#changes.since.07">Since draft-ietf-httpbis-p3-payload-07</a></li>
677               <li>E.10&nbsp;&nbsp;&nbsp;<a href="#changes.since.08">Since draft-ietf-httpbis-p3-payload-08</a></li>
678               <li>E.11&nbsp;&nbsp;&nbsp;<a href="#changes.since.09">Since draft-ietf-httpbis-p3-payload-09</a></li>
679               <li>E.12&nbsp;&nbsp;&nbsp;<a href="#changes.since.10">Since draft-ietf-httpbis-p3-payload-10</a></li>
680               <li>E.13&nbsp;&nbsp;&nbsp;<a href="#changes.since.11">Since draft-ietf-httpbis-p3-payload-11</a></li>
681               <li>E.14&nbsp;&nbsp;&nbsp;<a href="#changes.since.12">Since draft-ietf-httpbis-p3-payload-12</a></li>
[1180]682               <li>E.15&nbsp;&nbsp;&nbsp;<a href="#changes.since.13">Since draft-ietf-httpbis-p3-payload-13</a></li>
[1271]683               <li>E.16&nbsp;&nbsp;&nbsp;<a href="#changes.since.14">Since draft-ietf-httpbis-p3-payload-14</a></li>
[1326]684               <li>E.17&nbsp;&nbsp;&nbsp;<a href="#changes.since.15">Since draft-ietf-httpbis-p3-payload-15</a></li>
[1401]685               <li>E.18&nbsp;&nbsp;&nbsp;<a href="#changes.since.16">Since draft-ietf-httpbis-p3-payload-16</a></li>
[1467]686               <li>E.19&nbsp;&nbsp;&nbsp;<a href="#changes.since.17">Since draft-ietf-httpbis-p3-payload-17</a></li>
[1499]687               <li>E.20&nbsp;&nbsp;&nbsp;<a href="#changes.since.18">Since draft-ietf-httpbis-p3-payload-18</a></li>
[115]688            </ul>
689         </li>
[1072]690         <li><a href="#rfc.index">Index</a></li>
[52]691      </ul>
692      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
[163]693      <p id="rfc.section.1.p.1">This document defines HTTP/1.1 message payloads (a.k.a., content), the associated metadata header fields that define how the
[912]694         payload is intended to be interpreted by a recipient, the request header fields that might influence content selection, and
[163]695         the various selection algorithms that are collectively referred to as HTTP content negotiation.
[52]696      </p>
[161]697      <p id="rfc.section.1.p.2">This document is currently disorganized in order to minimize the changes between drafts and enable reviewers to see the smaller
[980]698         errata changes. A future draft will reorganize the sections to better reflect the content. In particular, the sections on
[161]699         entities will be renamed payload and moved to the first half of the document, while the sections on content negotiation and
700         associated request header fields will be moved to the second half. The current mess reflects how widely dispersed these topics
701         and associated requirements had become in <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>.
702      </p>
[660]703      <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;<a id="terminology" href="#terminology">Terminology</a></h2>
704      <p id="rfc.section.1.1.p.1">This specification uses a number of terms to refer to the roles played by participants in, and objects of, the HTTP communication.</p>
705      <p id="rfc.section.1.1.p.2"> <span id="rfc.iref.c.1"></span>  <dfn>content negotiation</dfn> 
706      </p>
[729]707      <ul class="empty">
[857]708         <li>The mechanism for selecting the appropriate representation when servicing a request. The representation in any response can
709            be negotiated (including error responses).
[729]710         </li>
711      </ul>
[1571]712      <p id="rfc.section.1.1.p.3"> <span id="rfc.iref.s.1"></span>  <dfn>selected representation</dfn> 
713      </p>
714      <ul class="empty">
715         <li>The current representation of the target resource that would have been selected in a successful response if the same request
716            had used the method GET and excluded any conditional request header fields.
717         </li>
718      </ul>
[1452]719      <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;<a id="intro.conformance.and.error.handling" href="#intro.conformance.and.error.handling">Conformance and Error Handling</a></h2>
[660]720      <p id="rfc.section.1.2.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
[96]721         in this document are to be interpreted as described in <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.
722      </p>
[1452]723      <p id="rfc.section.1.2.p.2">This document defines conformance criteria for several roles in HTTP communication, including Senders, Recipients, Clients,
724         Servers, User-Agents, Origin Servers, Intermediaries, Proxies and Gateways. See <a href="p1-messaging.html#architecture" title="Architecture">Section 2</a> of <a href="#Part1" id="rfc.xref.Part1.1"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> for definitions of these terms.
[96]725      </p>
[1452]726      <p id="rfc.section.1.2.p.3">An implementation is considered conformant if it complies with all of the requirements associated with its role(s). Note that
727         SHOULD-level requirements are relevant here, unless one of the documented exceptions is applicable.
728      </p>
729      <p id="rfc.section.1.2.p.4">This document also uses ABNF to define valid protocol elements (<a href="#notation" title="Syntax Notation">Section&nbsp;1.3</a>). In addition to the prose requirements placed upon them, Senders <em class="bcp14">MUST NOT</em> generate protocol elements that are invalid.
730      </p>
731      <p id="rfc.section.1.2.p.5">Unless noted otherwise, Recipients <em class="bcp14">MAY</em> take steps to recover a usable protocol element from an invalid construct. However, HTTP does not define specific error handling
732         mechanisms, except in cases where it has direct impact on security. This is because different uses of the protocol require
733         different error handling strategies; for example, a Web browser may wish to transparently recover from a response where the
734         Location header field doesn't parse according to the ABNF, whereby in a systems control protocol using HTTP, this type of
735         error recovery could lead to dangerous consequences.
736      </p>
[660]737      <h2 id="rfc.section.1.3"><a href="#rfc.section.1.3">1.3</a>&nbsp;<a id="notation" href="#notation">Syntax Notation</a></h2>
[1519]738      <p id="rfc.section.1.3.p.1">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 the list rule extension defined in <a href="p1-messaging.html#notation" title="Syntax Notation">Section 1.2</a> of <a href="#Part1" id="rfc.xref.Part1.2"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. <a href="#collected.abnf" title="Collected ABNF">Appendix&nbsp;D</a> shows the collected ABNF with the list rule expanded.
[543]739      </p>
[660]740      <p id="rfc.section.1.3.p.2">The following core rules are included by reference, as defined in <a href="#RFC5234" id="rfc.xref.RFC5234.2"><cite title="Augmented BNF for Syntax Specifications: ABNF">[RFC5234]</cite></a>, <a href="http://tools.ietf.org/html/rfc5234#appendix-B.1">Appendix B.1</a>: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG
[1425]741         (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII
742         character).
[205]743      </p>
[660]744      <h3 id="rfc.section.1.3.1"><a href="#rfc.section.1.3.1">1.3.1</a>&nbsp;<a id="core.rules" href="#core.rules">Core Rules</a></h3>
[1452]745      <p id="rfc.section.1.3.1.p.1">The core rules below are defined in <a href="#Part1" id="rfc.xref.Part1.3"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>:
[424]746      </p>
[1519]747      <div id="rfc.figure.u.1"></div><pre class="inline">  <a href="#core.rules" class="smpl">OWS</a>            = &lt;OWS, defined in <a href="#Part1" id="rfc.xref.Part1.4"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#whitespace" title="Whitespace">Section 3.2.1</a>&gt;
748  <a href="#core.rules" class="smpl">token</a>          = &lt;token, defined in <a href="#Part1" id="rfc.xref.Part1.5"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#field.components" title="Field value components">Section 3.2.4</a>&gt;
749  <a href="#core.rules" class="smpl">word</a>           = &lt;word, defined in <a href="#Part1" id="rfc.xref.Part1.6"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#field.components" title="Field value components">Section 3.2.4</a>&gt;
[660]750</pre><h3 id="rfc.section.1.3.2"><a href="#rfc.section.1.3.2">1.3.2</a>&nbsp;<a id="abnf.dependencies" href="#abnf.dependencies">ABNF Rules defined in other Parts of the Specification</a></h3>
751      <p id="rfc.section.1.3.2.p.1">The ABNF rules below are defined in other parts:</p>
[1452]752      <div id="rfc.figure.u.2"></div><pre class="inline">  <a href="#abnf.dependencies" class="smpl">absolute-URI</a>   = &lt;absolute-URI, defined in <a href="#Part1" id="rfc.xref.Part1.7"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#uri" title="Uniform Resource Identifiers">Section 2.7</a>&gt;
753  <a href="#abnf.dependencies" class="smpl">partial-URI</a>    = &lt;partial-URI, defined in <a href="#Part1" id="rfc.xref.Part1.8"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#uri" title="Uniform Resource Identifiers">Section 2.7</a>&gt;
[1586]754  <a href="#abnf.dependencies" class="smpl">qvalue</a>         = &lt;qvalue, defined in <a href="#Part1" id="rfc.xref.Part1.9"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#quality.values" title="Quality Values">Section 4.3.1</a>&gt;
[424]755</pre><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="protocol.parameters" href="#protocol.parameters">Protocol Parameters</a></h1>
[1177]756      <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="character.sets" href="#character.sets">Character Encodings (charset)</a></h2>
757      <p id="rfc.section.2.1.p.1">HTTP uses charset names to indicate the character encoding of a textual representation.</p>
[229]758      <div id="rule.charset">
[1177]759         <p id="rfc.section.2.1.p.2">  A character encoding is identified by a case-insensitive token. The complete set of tokens is defined by the IANA Character
[229]760            Set registry (&lt;<a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a>&gt;).
761         </p>
762      </div>
[1167]763      <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.1"></span>  <a href="#rule.charset" class="smpl">charset</a> = <a href="#core.rules" class="smpl">token</a>
[1177]764</pre><p id="rfc.section.2.1.p.4">Although HTTP allows an arbitrary token to be used as a charset value, any token that has a predefined value within the IANA
765         Character Set registry <em class="bcp14">MUST</em> represent the character encoding defined by that registry. Applications <em class="bcp14">SHOULD</em> limit their use of character encodings to those defined within the IANA registry.
[52]766      </p>
[1177]767      <p id="rfc.section.2.1.p.5">HTTP uses charset in two contexts: within an Accept-Charset request header field (in which the charset value is an unquoted
[994]768         token) and as the value of a parameter in a Content-Type header field (within a request or response), in which case the parameter
769         value of the charset parameter can be quoted.
[52]770      </p>
[1177]771      <p id="rfc.section.2.1.p.6">Implementors need to be aware of IETF character set requirements <a href="#RFC3629" id="rfc.xref.RFC3629.1"><cite title="UTF-8, a transformation format of ISO 10646">[RFC3629]</cite></a>  <a href="#RFC2277" id="rfc.xref.RFC2277.1"><cite title="IETF Policy on Character Sets and Languages">[RFC2277]</cite></a>.
[92]772      </p>
[424]773      <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a id="content.codings" href="#content.codings">Content Codings</a></h2>
[868]774      <p id="rfc.section.2.2.p.1">Content coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings
775         are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity
776         of its underlying media type and without loss of information. Frequently, the representation is stored in coded form, transmitted
777         directly, and only decoded by the recipient.
[52]778      </p>
[1167]779      <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.2"></span>  <a href="#content.codings" class="smpl">content-coding</a>   = <a href="#core.rules" class="smpl">token</a>
[966]780</pre><p id="rfc.section.2.2.p.3">All content-coding values are case-insensitive. HTTP/1.1 uses content-coding values in the Accept-Encoding (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.1" title="Accept-Encoding">Section&nbsp;6.3</a>) and Content-Encoding (<a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section&nbsp;6.5</a>) header fields. Although the value describes the content-coding, what is more important is that it indicates what decoding
[52]781         mechanism will be required to remove the encoding.
782      </p>
[673]783      <p id="rfc.section.2.2.p.4">compress<span id="rfc.iref.c.2"></span><span id="rfc.iref.c.3"></span> 
[52]784      </p>
[729]785      <ul class="empty">
[1578]786         <li>See <a href="p1-messaging.html#compress.coding" title="Compress Coding">Section 4.2.1</a> of <a href="#Part1" id="rfc.xref.Part1.10"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.
[729]787         </li>
788      </ul>
[673]789      <p id="rfc.section.2.2.p.5">deflate<span id="rfc.iref.d.1"></span><span id="rfc.iref.c.4"></span> 
[52]790      </p>
[729]791      <ul class="empty">
[1578]792         <li>See <a href="p1-messaging.html#deflate.coding" title="Deflate Coding">Section 4.2.2</a> of <a href="#Part1" id="rfc.xref.Part1.11"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.
[729]793         </li>
794      </ul>
[673]795      <p id="rfc.section.2.2.p.6">gzip<span id="rfc.iref.g.3"></span><span id="rfc.iref.c.5"></span> 
[52]796      </p>
[729]797      <ul class="empty">
[1578]798         <li>See <a href="p1-messaging.html#gzip.coding" title="Gzip Coding">Section 4.2.3</a> of <a href="#Part1" id="rfc.xref.Part1.12"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.
[729]799         </li>
800      </ul>
[670]801      <h3 id="rfc.section.2.2.1"><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;<a id="content.coding.registry" href="#content.coding.registry">Content Coding Registry</a></h3>
802      <p id="rfc.section.2.2.1.p.1">The HTTP Content Coding Registry defines the name space for the content coding names.</p>
803      <p id="rfc.section.2.2.1.p.2">Registrations <em class="bcp14">MUST</em> include the following fields:
[52]804      </p>
[670]805      <ul>
806         <li>Name</li>
807         <li>Description</li>
808         <li>Pointer to specification text</li>
809      </ul>
[1578]810      <p id="rfc.section.2.2.1.p.3">Names of content codings <em class="bcp14">MUST NOT</em> overlap with names of transfer codings (<a href="p1-messaging.html#transfer.codings" title="Transfer Codings">Section 4</a> of <a href="#Part1" id="rfc.xref.Part1.13"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>), unless the encoding transformation is identical (as is the case for the compression codings defined in <a href="p1-messaging.html#compression.codings" title="Compression Codings">Section 4.2</a> of <a href="#Part1" id="rfc.xref.Part1.14"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>).
[808]811      </p>
[1567]812      <p id="rfc.section.2.2.1.p.4">Values to be added to this name space require IETF Review (see <a href="http://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a> of <a href="#RFC5226" id="rfc.xref.RFC5226.1"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>), and <em class="bcp14">MUST</em> conform to the purpose of content coding defined in this section.
[670]813      </p>
[808]814      <p id="rfc.section.2.2.1.p.5">The registry itself is maintained at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt;.
[670]815      </p>
[424]816      <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;<a id="media.types" href="#media.types">Media Types</a></h2>
[1267]817      <p id="rfc.section.2.3.p.1">HTTP uses Internet Media Types <a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> in the Content-Type (<a href="#header.content-type" id="rfc.xref.header.content-type.1" title="Content-Type">Section&nbsp;6.8</a>) and Accept (<a href="#header.accept" id="rfc.xref.header.accept.1" title="Accept">Section&nbsp;6.1</a>) header fields in order to provide open and extensible data typing and type negotiation.
[52]818      </p>
[1167]819      <div id="rfc.figure.u.5"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span>  <a href="#media.types" class="smpl">media-type</a> = <a href="#media.types" class="smpl">type</a> "/" <a href="#media.types" class="smpl">subtype</a> *( <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> <a href="#rule.parameter" class="smpl">parameter</a> )
[424]820  <a href="#media.types" class="smpl">type</a>       = <a href="#core.rules" class="smpl">token</a>
821  <a href="#media.types" class="smpl">subtype</a>    = <a href="#core.rules" class="smpl">token</a>
[229]822</pre><div id="rule.parameter">
[1153]823         <p id="rfc.section.2.3.p.3">      The type/subtype <em class="bcp14">MAY</em> be followed by parameters in the form of attribute/value pairs.
[229]824         </p>
825      </div>
[1167]826      <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.7"></span><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span>  <a href="#rule.parameter" class="smpl">parameter</a>      = <a href="#rule.parameter" class="smpl">attribute</a> "=" <a href="#rule.parameter" class="smpl">value</a>
[424]827  <a href="#rule.parameter" class="smpl">attribute</a>      = <a href="#core.rules" class="smpl">token</a>
[810]828  <a href="#rule.parameter" class="smpl">value</a>          = <a href="#core.rules" class="smpl">word</a>
[424]829</pre><p id="rfc.section.2.3.p.5">The type, subtype, and parameter attribute names are case-insensitive. Parameter values might or might not be case-sensitive,
[370]830         depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing
831         of a media-type, depending on its definition within the media type registry.
[52]832      </p>
[912]833      <p id="rfc.section.2.3.p.6">A parameter value that matches the <a href="#core.rules" class="smpl">token</a> production can be transmitted as either a token or within a quoted-string. The quoted and unquoted values are equivalent.
[297]834      </p>
[424]835      <p id="rfc.section.2.3.p.7">Note that some older HTTP applications do not recognize media type parameters. When sending data to older HTTP applications,
[52]836         implementations <em class="bcp14">SHOULD</em> only use media type parameters when they are required by that type/subtype definition.
837      </p>
[424]838      <p id="rfc.section.2.3.p.8">Media-type values are registered with the Internet Assigned Number Authority (IANA). The media type registration process is
[152]839         outlined in <a href="#RFC4288" id="rfc.xref.RFC4288.1"><cite title="Media Type Specifications and Registration Procedures">[RFC4288]</cite></a>. Use of non-registered media types is discouraged.
[52]840      </p>
[424]841      <h3 id="rfc.section.2.3.1"><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;<a id="canonicalization.and.text.defaults" href="#canonicalization.and.text.defaults">Canonicalization and Text Defaults</a></h3>
[875]842      <p id="rfc.section.2.3.1.p.1">Internet media types are registered with a canonical form. A representation transferred via HTTP messages <em class="bcp14">MUST</em> be in the appropriate canonical form prior to its transmission except for "text" types, as defined in the next paragraph.
[52]843      </p>
[424]844      <p id="rfc.section.2.3.1.p.2">When in canonical form, media subtypes of the "text" type use CRLF as the text line break. HTTP relaxes this requirement and
[52]845         allows the transport of text media with plain CR or LF alone representing a line break when it is done consistently for an
[875]846         entire representation. HTTP applications <em class="bcp14">MUST</em> accept CRLF, bare CR, and bare LF as indicating a line break in text media received via HTTP. In addition, if the text is
847         in a character encoding that does not use octets 13 and 10 for CR and LF respectively, as is the case for some multi-byte
848         character encodings, HTTP allows the use of whatever octet sequences are defined by that character encoding to represent the
849         equivalent of CR and LF for line breaks. This flexibility regarding line breaks applies only to text media in the payload
850         body; a bare CR or LF <em class="bcp14">MUST NOT</em> be substituted for CRLF within any of the HTTP control structures (such as header fields and multipart boundaries).
[52]851      </p>
[875]852      <p id="rfc.section.2.3.1.p.3">If a representation is encoded with a content-coding, the underlying data <em class="bcp14">MUST</em> be in a form defined above prior to being encoded.
[52]853      </p>
[424]854      <h3 id="rfc.section.2.3.2"><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;<a id="multipart.types" href="#multipart.types">Multipart Types</a></h3>
[1544]855      <p id="rfc.section.2.3.2.p.1">MIME provides for a number of "multipart" types — encapsulations of one or more representations within a single message body.
[875]856         All multipart types share a common syntax, as defined in <a href="http://tools.ietf.org/html/rfc2046#section-5.1.1">Section 5.1.1</a> of <a href="#RFC2046" id="rfc.xref.RFC2046.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, and <em class="bcp14">MUST</em> include a boundary parameter as part of the media type value. The message body is itself a protocol element and <em class="bcp14">MUST</em> therefore use only CRLF to represent line breaks between body-parts.
[52]857      </p>
[1544]858      <p id="rfc.section.2.3.2.p.2">In general, HTTP treats a multipart message body no differently than any other media type: strictly as payload. HTTP does
859         not use the multipart boundary as an indicator of message body length.  In all other respects, an HTTP user agent <em class="bcp14">SHOULD</em> follow the same or similar behavior as a MIME user agent would upon receipt of a multipart type. The MIME header fields within
860         each body-part of a multipart message body do not have any significance to HTTP beyond that defined by their MIME semantics.
[52]861      </p>
[853]862      <p id="rfc.section.2.3.2.p.3">If an application receives an unrecognized multipart subtype, the application <em class="bcp14">MUST</em> treat it as being equivalent to "multipart/mixed".
[52]863      </p>
[754]864      <div class="note" id="rfc.section.2.3.2.p.4"> 
[563]865         <p> <b>Note:</b> The "multipart/form-data" type has been specifically defined for carrying form data suitable for processing via the POST request
[129]866            method, as described in <a href="#RFC2388" id="rfc.xref.RFC2388.1"><cite title="Returning Values from Forms: multipart/form-data">[RFC2388]</cite></a>.
[563]867         </p> 
868      </div>
[457]869      <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a>&nbsp;<a id="language.tags" href="#language.tags">Language Tags</a></h2>
[690]870      <p id="rfc.section.2.4.p.1">A language tag, as defined in <a href="#RFC5646" id="rfc.xref.RFC5646.1"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to
[613]871         other human beings. Computer languages are explicitly excluded. HTTP uses language tags within the Accept-Language and Content-Language
872         fields.
[52]873      </p>
[613]874      <p id="rfc.section.2.4.p.2">In summary, a language tag is composed of one or more parts: A primary language subtag followed by a possibly empty series
875         of subtags:
[52]876      </p>
[1167]877      <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.10"></span>  <a href="#language.tags" class="smpl">language-tag</a> = &lt;Language-Tag, defined in <a href="#RFC5646" id="rfc.xref.RFC5646.2"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, <a href="http://tools.ietf.org/html/rfc5646#section-2.1">Section 2.1</a>&gt;
[613]878</pre><p id="rfc.section.2.4.p.4">White space is not allowed within the tag and all tags are case-insensitive. The name space of language subtags is administered
879         by the IANA (see &lt;<a href="http://www.iana.org/assignments/language-subtag-registry">http://www.iana.org/assignments/language-subtag-registry</a>&gt;).
[52]880      </p>
[1167]881      <div id="rfc.figure.u.8"></div> 
[613]882      <p>Example tags include:</p>  <pre class="text">  en, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN
[690]883</pre> <p id="rfc.section.2.4.p.6">See <a href="#RFC5646" id="rfc.xref.RFC5646.3"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a> for further information.
[52]884      </p>
[966]885      <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="payload" href="#payload">Payload</a></h1>
886      <p id="rfc.section.3.p.1">HTTP messages <em class="bcp14">MAY</em> transfer a payload if not otherwise restricted by the request method or response status code. The payload consists of metadata,
[1544]887         in the form of header fields, and data, in the form of the sequence of octets in the message body after any transfer-coding
[966]888         has been decoded.
[52]889      </p>
[966]890      <div id="rfc.iref.p.1"></div>
891      <p id="rfc.section.3.p.2">A "<dfn>payload</dfn>" in HTTP is always a partial or complete representation of some resource. We use separate terms for payload and representation
892         because some messages contain only the associated representation's header fields (e.g., responses to HEAD) or only some part(s)
893         of the representation (e.g., the 206 status code).
[52]894      </p>
[966]895      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;<a id="payload.header.fields" href="#payload.header.fields">Payload Header Fields</a></h2>
896      <p id="rfc.section.3.1.p.1">HTTP header fields that specifically define the payload, rather than the associated representation, are referred to as "payload
897         header fields". The following payload header fields are defined by HTTP/1.1:
[52]898      </p>
[1138]899      <div id="rfc.table.u.1">
900         <table class="tt full left" cellpadding="3" cellspacing="0">
901            <thead>
902               <tr>
903                  <th>Header Field Name</th>
904                  <th>Defined in...</th>
905               </tr>
906            </thead>
907            <tbody>
908               <tr>
909                  <td class="left">Content-Length</td>
[1544]910                  <td class="left"><a href="p1-messaging.html#header.content-length" title="Content-Length">Section 3.3.2</a> of <a href="#Part1" id="rfc.xref.Part1.15"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a></td>
[1138]911               </tr>
912               <tr>
913                  <td class="left">Content-Range</td>
[1167]914                  <td class="left"><a href="p5-range.html#header.content-range" title="Content-Range">Section 5.2</a> of <a href="#Part5" id="rfc.xref.Part5.1"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td>
[1138]915               </tr>
916            </tbody>
917         </table>
918      </div>
919      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;<a id="payload.body" href="#payload.body">Payload Body</a></h2>
[1544]920      <p id="rfc.section.3.2.p.1">A payload body is only present in a message when a message body is present, as described in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.16"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. The payload body is obtained from the message body by decoding any Transfer-Encoding that might have been applied to ensure
[52]921         safe and proper transfer of the message.
922      </p>
[966]923      <div id="rfc.iref.r.1"></div>
924      <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a id="representation" href="#representation">Representation</a></h1>
925      <p id="rfc.section.4.p.1">A "<dfn>representation</dfn>" is information in a format that can be readily communicated from one party to another. A resource representation is information
926         that reflects the state of that resource, as observed at some point in the past (e.g., in a response to GET) or to be desired
927         at some point in the future (e.g., in a PUT request).
[52]928      </p>
[966]929      <p id="rfc.section.4.p.2">Most, but not all, representations transferred via HTTP are intended to be a representation of the target resource (the resource
930         identified by the effective request URI). The precise semantics of a representation are determined by the type of message
931         (request or response), the request method, the response status code, and the representation metadata. For example, the above
932         semantic is true for the representation in any 200 (OK) response to GET and for the representation in any PUT request. A 200
933         response to PUT, in contrast, contains either a representation that describes the successful action or a representation of
934         the target resource, with the latter indicated by a Content-Location header field with the same value as the effective request
935         URI. Likewise, response messages with an error status code usually contain a representation that describes the error and what
936         next steps are suggested for resolving it.
[52]937      </p>
[966]938      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;<a id="representation.header.fields" href="#representation.header.fields">Representation Header Fields</a></h2>
[1544]939      <p id="rfc.section.4.1.p.1">Representation header fields define metadata about the representation data enclosed in the message body or, if no message
940         body is present, about the representation that would have been transferred in a 200 response to a simultaneous GET request
941         with the same effective request URI.
[831]942      </p>
[966]943      <p id="rfc.section.4.1.p.2">The following header fields are defined as representation metadata:</p>
[1138]944      <div id="rfc.table.u.2">
945         <table class="tt full left" cellpadding="3" cellspacing="0">
946            <thead>
947               <tr>
948                  <th>Header Field Name</th>
949                  <th>Defined in...</th>
950               </tr>
951            </thead>
952            <tbody>
953               <tr>
954                  <td class="left">Content-Encoding</td>
955                  <td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.2" title="Content-Encoding">Section&nbsp;6.5</a></td>
956               </tr>
957               <tr>
958                  <td class="left">Content-Language</td>
959                  <td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section&nbsp;6.6</a></td>
960               </tr>
961               <tr>
962                  <td class="left">Content-Location</td>
963                  <td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.1" title="Content-Location">Section&nbsp;6.7</a></td>
964               </tr>
965               <tr>
966                  <td class="left">Content-Type</td>
[1267]967                  <td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.2" title="Content-Type">Section&nbsp;6.8</a></td>
[1138]968               </tr>
969               <tr>
970                  <td class="left">Expires</td>
[1167]971                  <td class="left"><a href="p6-cache.html#header.expires" title="Expires">Section 3.3</a> of <a href="#Part6" id="rfc.xref.Part6.1"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a></td>
[1138]972               </tr>
[1571]973            </tbody>
974         </table>
975      </div>
976      <p id="rfc.section.4.1.p.3">Additional header fields define metadata about the selected representation, which might differ from the representation included
977         in the message for responses to some state-changing methods. The following header fields are defined as selected representation
978         metadata:
979      </p>
980      <div id="rfc.table.u.3">
981         <table class="tt full left" cellpadding="3" cellspacing="0">
982            <thead>
[1138]983               <tr>
[1571]984                  <th>Header Field Name</th>
985                  <th>Defined in...</th>
986               </tr>
987            </thead>
988            <tbody>
989               <tr>
990                  <td class="left">ETag</td>
991                  <td class="left"><a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td>
992               </tr>
993               <tr>
[1138]994                  <td class="left">Last-Modified</td>
[1571]995                  <td class="left"><a href="p4-conditional.html#header.last-modified" title="Last-Modified">Section 2.2</a> of <a href="#Part4" id="rfc.xref.Part4.2"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td>
[1138]996               </tr>
997            </tbody>
998         </table>
999      </div>
1000      <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a id="representation.data" href="#representation.data">Representation Data</a></h2>
[966]1001      <p id="rfc.section.4.2.p.1">The representation body associated with an HTTP message is either provided as the payload body of the message or referred
1002         to by the message semantics and the effective request URI. The representation data is in a format and encoding defined by
1003         the representation metadata header fields.
[831]1004      </p>
[966]1005      <p id="rfc.section.4.2.p.2">The data type of the representation data is determined via the header fields Content-Type and Content-Encoding. These define
1006         a two-layer, ordered encoding model:
[831]1007      </p>
[1167]1008      <div id="rfc.figure.u.9"></div><pre class="text">  representation-data := Content-Encoding( Content-Type( bits ) )
[966]1009</pre><p id="rfc.section.4.2.p.4">Content-Type specifies the media type of the underlying data, which defines both the data format and how that data <em class="bcp14">SHOULD</em> be processed by the recipient (within the scope of the request method semantics). Any HTTP/1.1 message containing a payload
1010         body <em class="bcp14">SHOULD</em> include a Content-Type header field defining the media type of the associated representation unless that metadata is unknown
1011         to the sender. If the Content-Type header field is not present, it indicates that the sender does not know the media type
1012         of the representation; recipients <em class="bcp14">MAY</em> either assume that the media type is "application/octet-stream" (<a href="#RFC2046" id="rfc.xref.RFC2046.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-4.5.1">Section 4.5.1</a>) or examine the content to determine its type.
[52]1013      </p>
[966]1014      <p id="rfc.section.4.2.p.5">In practice, resource owners do not always properly configure their origin server to provide the correct Content-Type for
1015         a given representation, with the result that some clients will examine a response body's content and override the specified
1016         type. Clients that do so risk drawing incorrect conclusions, which might expose additional security risks (e.g., "privilege
1017         escalation"). Furthermore, it is impossible to determine the sender's intent by examining the data format: many data formats
1018         match multiple media types that differ only in processing semantics. Implementers are encouraged to provide a means of disabling
1019         such "content sniffing" when it is used.
1020      </p>
1021      <p id="rfc.section.4.2.p.6">Content-Encoding is used to indicate any additional content codings applied to the data, usually for the purpose of data compression,
1022         that are a property of the representation. If Content-Encoding is not present, then there is no additional encoding beyond
1023         that defined by the Content-Type.
1024      </p>
1025      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="content.negotiation" href="#content.negotiation">Content Negotiation</a></h1>
1026      <p id="rfc.section.5.p.1">HTTP responses include a representation which contains information for interpretation, whether by a human user or for further
[745]1027         processing. Often, the server has different ways of representing the same information; for example, in different formats,
1028         languages, or using different character encodings.
[52]1029      </p>
[966]1030      <p id="rfc.section.5.p.2">HTTP clients and their users might have different or variable capabilities, characteristics or preferences which would influence
[745]1031         which representation, among those available from the server, would be best for the server to deliver. For this reason, HTTP
[1101]1032         provides mechanisms for "content negotiation" — a process of allowing selection of a representation of a given resource, when
1033         more than one is available.
[52]1034      </p>
[966]1035      <p id="rfc.section.5.p.3">This specification defines two patterns of content negotiation; "server-driven", where the server selects the representation
[745]1036         based upon the client's stated preferences, and "agent-driven" negotiation, where the server provides a list of representations
1037         for the client to choose from, based upon their metadata. In addition, there are other patterns: some applications use an
1038         "active content" pattern, where the server returns active content which runs on the client and, based on client available
1039         parameters, selects additional resources to invoke. "Transparent Content Negotiation" (<a href="#RFC2295" id="rfc.xref.RFC2295.1"><cite title="Transparent Content Negotiation in HTTP">[RFC2295]</cite></a>) has also been proposed.
[52]1040      </p>
[966]1041      <p id="rfc.section.5.p.4">These patterns are all widely used, and have trade-offs in applicability and practicality. In particular, when the number
[745]1042         of preferences or capabilities to be expressed by a client are large (such as when many different formats are supported by
[912]1043         a user-agent), server-driven negotiation becomes unwieldy, and might not be appropriate. Conversely, when the number of representations
1044         to choose from is very large, agent-driven negotiation might not be appropriate.
[745]1045      </p>
[966]1046      <p id="rfc.section.5.p.5">Note that in all cases, the supplier of representations has the responsibility for determining which representations might
[745]1047         be considered to be the "same information".
1048      </p>
[966]1049      <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;<a id="server-driven.negotiation" href="#server-driven.negotiation">Server-driven Negotiation</a></h2>
1050      <p id="rfc.section.5.1.p.1">If the selection of the best representation for a response is made by an algorithm located at the server, it is called server-driven
[763]1051         negotiation. Selection is based on the available representations of the response (the dimensions over which it can vary; e.g.,
[52]1052         language, content-coding, etc.) and the contents of particular header fields in the request message or on other information
1053         pertaining to the request (such as the network address of the client).
1054      </p>
[966]1055      <p id="rfc.section.5.1.p.2">Server-driven negotiation is advantageous when the algorithm for selecting from among the available representations is difficult
[52]1056         to describe to the user agent, or when the server desires to send its "best guess" to the client along with the first response
1057         (hoping to avoid the round-trip delay of a subsequent request if the "best guess" is good enough for the user). In order to
1058         improve the server's guess, the user agent <em class="bcp14">MAY</em> include request header fields (Accept, Accept-Language, Accept-Encoding, etc.) which describe its preferences for such a response.
1059      </p>
[966]1060      <p id="rfc.section.5.1.p.3">Server-driven negotiation has disadvantages: </p>
[52]1061      <ol>
1062         <li>It is impossible for the server to accurately determine what might be "best" for any given user, since that would require
1063            complete knowledge of both the capabilities of the user agent and the intended use for the response (e.g., does the user want
1064            to view it on screen or print it on paper?).
1065         </li>
1066         <li>Having the user agent describe its capabilities in every request can be both very inefficient (given that only a small percentage
1067            of responses have multiple representations) and a potential violation of the user's privacy.
1068         </li>
1069         <li>It complicates the implementation of an origin server and the algorithms for generating responses to a request.</li>
[912]1070         <li>It might limit a public cache's ability to use the same response for multiple user's requests.</li>
[52]1071      </ol>
[1514]1072      <p id="rfc.section.5.1.p.4">Server-driven negotiation allows the user agent to specify its preferences, but it cannot expect responses to always honor
[1335]1073         them. For example, the origin server might not implement server-driven negotiation, or it might decide that sending a response
1074         that doesn't conform to them is better than sending a 406 (Not Acceptable) response.
1075      </p>
[1586]1076      <p id="rfc.section.5.1.p.5">Many of the mechanisms for expressing preferences use quality values to declare relative preference. See <a href="p1-messaging.html#quality.values" title="Quality Values">Section 4.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.17"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> for more information.
[1335]1077      </p>
1078      <p id="rfc.section.5.1.p.6">HTTP/1.1 includes the following header fields for enabling server-driven negotiation through description of user agent capabilities
[1544]1079         and user preferences: Accept (<a href="#header.accept" id="rfc.xref.header.accept.2" title="Accept">Section&nbsp;6.1</a>), Accept-Charset (<a href="#header.accept-charset" id="rfc.xref.header.accept-charset.1" title="Accept-Charset">Section&nbsp;6.2</a>), Accept-Encoding (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.2" title="Accept-Encoding">Section&nbsp;6.3</a>), Accept-Language (<a href="#header.accept-language" id="rfc.xref.header.accept-language.1" title="Accept-Language">Section&nbsp;6.4</a>), and User-Agent (<a href="p2-semantics.html#header.user-agent" title="User-Agent">Section 10.10</a> of <a href="#Part2" id="rfc.xref.Part2.1"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>). However, an origin server is not limited to these dimensions and <em class="bcp14">MAY</em> vary the response based on any aspect of the request, including aspects of the connection (e.g., IP address) or information
[1164]1080         within extension header fields not defined by this specification.
[52]1081      </p>
[1335]1082      <div class="note" id="rfc.section.5.1.p.7"> 
[745]1083         <p> <b>Note:</b> In practice, User-Agent based negotiation is fragile, because new clients might not be recognized.
1084         </p> 
1085      </div>
[1335]1086      <p id="rfc.section.5.1.p.8">The Vary header field (<a href="p6-cache.html#header.vary" title="Vary">Section 3.5</a> of <a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) can be used to express the parameters the server uses to select a representation that is subject to server-driven negotiation.
[52]1087      </p>
[966]1088      <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;<a id="agent-driven.negotiation" href="#agent-driven.negotiation">Agent-driven Negotiation</a></h2>
1089      <p id="rfc.section.5.2.p.1">With agent-driven negotiation, selection of the best representation for a response is performed by the user agent after receiving
[52]1090         an initial response from the origin server. Selection is based on a list of the available representations of the response
[875]1091         included within the header fields or body of the initial response, with each representation identified by its own URI. Selection
[912]1092         from among the representations can be performed automatically (if the user agent is capable of doing so) or manually by the
[875]1093         user selecting from a generated (possibly hypertext) menu.
[52]1094      </p>
[966]1095      <p id="rfc.section.5.2.p.2">Agent-driven negotiation is advantageous when the response would vary over commonly-used dimensions (such as type, language,
[52]1096         or encoding), when the origin server is unable to determine a user agent's capabilities from examining the request, and generally
1097         when public caches are used to distribute server load and reduce network usage.
1098      </p>
[966]1099      <p id="rfc.section.5.2.p.3">Agent-driven negotiation suffers from the disadvantage of needing a second request to obtain the best alternate representation.
[52]1100         This second request is only efficient when caching is used. In addition, this specification does not define any mechanism
1101         for supporting automatic selection, though it also does not prevent any such mechanism from being developed as an extension
1102         and used within HTTP/1.1.
1103      </p>
[966]1104      <p id="rfc.section.5.2.p.4">This specification defines the 300 (Multiple Choices) and 406 (Not Acceptable) status codes for enabling agent-driven negotiation
[745]1105         when the server is unwilling or unable to provide a varying response using server-driven negotiation.
[52]1106      </p>
[1415]1107      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="header.field.definitions" href="#header.field.definitions">Header Field Definitions</a></h1>
[966]1108      <p id="rfc.section.6.p.1">This section defines the syntax and semantics of HTTP/1.1 header fields related to the payload of messages.</p>
[52]1109      <div id="rfc.iref.a.1"></div>
1110      <div id="rfc.iref.h.1"></div>
[966]1111      <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;<a id="header.accept" href="#header.accept">Accept</a></h2>
[1164]1112      <p id="rfc.section.6.1.p.1">The "Accept" header field can be used by user agents to specify response media types that are acceptable. Accept header fields
1113         can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request
1114         for an in-line image.
[52]1115      </p>
[1234]1116      <div id="rfc.figure.u.10"></div><pre class="inline"><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span>  <a href="#header.accept" class="smpl">Accept</a> = #( <a href="#header.accept" class="smpl">media-range</a> [ <a href="#header.accept" class="smpl">accept-params</a> ] )
[135]1117 
[229]1118  <a href="#header.accept" class="smpl">media-range</a>    = ( "*/*"
[334]1119                   / ( <a href="#media.types" class="smpl">type</a> "/" "*" )
1120                   / ( <a href="#media.types" class="smpl">type</a> "/" <a href="#media.types" class="smpl">subtype</a> )
[424]1121                   ) *( <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> <a href="#rule.parameter" class="smpl">parameter</a> )
[457]1122  <a href="#header.accept" class="smpl">accept-params</a>  = <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> "q=" <a href="#abnf.dependencies" class="smpl">qvalue</a> *( <a href="#header.accept" class="smpl">accept-ext</a> )
[1039]1123  <a href="#header.accept" class="smpl">accept-ext</a>     = <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> <a href="#core.rules" class="smpl">token</a> [ "=" <a href="#core.rules" class="smpl">word</a> ]
[966]1124</pre><p id="rfc.section.6.1.p.3">The asterisk "*" character is used to group media types into ranges, with "*/*" indicating all media types and "type/*" indicating
[52]1125         all subtypes of that type. The media-range <em class="bcp14">MAY</em> include media type parameters that are applicable to that range.
1126      </p>
[966]1127      <p id="rfc.section.6.1.p.4">Each media-range <em class="bcp14">MAY</em> be followed by one or more accept-params, beginning with the "q" parameter for indicating a relative quality factor. The first
[52]1128         "q" parameter (if any) separates the media-range parameter(s) from the accept-params. Quality factors allow the user or user
[1586]1129         agent to indicate the relative degree of preference for that media-range, using the qvalue scale from 0 to 1 (<a href="p1-messaging.html#quality.values" title="Quality Values">Section 4.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.18"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). The default value is q=1.
[52]1130      </p>
[966]1131      <div class="note" id="rfc.section.6.1.p.5"> 
[563]1132         <p> <b>Note:</b> Use of the "q" parameter name to separate media type parameters from Accept extension parameters is due to historical practice.
[52]1133            Although this prevents any media type parameter named "q" from being used with a media range, such an event is believed to
1134            be unlikely given the lack of any "q" parameters in the IANA media type registry and the rare usage of any media type parameters
1135            in Accept. Future media types are discouraged from registering any parameter named "q".
[563]1136         </p> 
1137      </div>
[966]1138      <p id="rfc.section.6.1.p.6">The example</p>
[1167]1139      <div id="rfc.figure.u.11"></div><pre class="text">  Accept: audio/*; q=0.2, audio/basic
[966]1140</pre><p id="rfc.section.6.1.p.8"> <em class="bcp14">SHOULD</em> be interpreted as "I prefer audio/basic, but send me any audio type if it is the best available after an 80% mark-down in
[879]1141         quality".
[52]1142      </p>
[1406]1143      <p id="rfc.section.6.1.p.9">A request without any Accept header field implies that the user agent will accept any media type in response. If an Accept
1144         header field is present in a request and none of the available representations for the response have a media type that is
1145         listed as acceptable, the origin server <em class="bcp14">MAY</em> either honor the Accept header field by sending a 406 (Not Acceptable) response or disregard the Accept header field by treating
1146         the response as if it is not subject to content negotiation.
[52]1147      </p>
[966]1148      <p id="rfc.section.6.1.p.10">A more elaborate example is</p>
[1167]1149      <div id="rfc.figure.u.12"></div><pre class="text">  Accept: text/plain; q=0.5, text/html,
[357]1150          text/x-dvi; q=0.8, text/x-c
[966]1151</pre><p id="rfc.section.6.1.p.12">Verbally, this would be interpreted as "text/html and text/x-c are the preferred media types, but if they do not exist, then
[879]1152         send the text/x-dvi representation, and if that does not exist, send the text/plain representation".
[52]1153      </p>
[966]1154      <p id="rfc.section.6.1.p.13">Media ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies
[52]1155         to a given type, the most specific reference has precedence. For example,
1156      </p>
[1244]1157      <div id="rfc.figure.u.13"></div><pre class="text">  Accept: text/*, text/plain, text/plain;format=flowed, */*
[966]1158</pre><p id="rfc.section.6.1.p.15">have the following precedence: </p>
[459]1159      <ol>
[1244]1160         <li>text/plain;format=flowed</li>
1161         <li>text/plain</li>
[459]1162         <li>text/*</li>
1163         <li>*/*</li>
1164      </ol>
[966]1165      <p id="rfc.section.6.1.p.16">The media type quality factor associated with a given type is determined by finding the media range with the highest precedence
[52]1166         which matches that type. For example,
1167      </p>
[1167]1168      <div id="rfc.figure.u.14"></div><pre class="text">  Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,
[357]1169          text/html;level=2;q=0.4, */*;q=0.5
[966]1170</pre><p id="rfc.section.6.1.p.18">would cause the following values to be associated:</p>
[1571]1171      <div id="rfc.table.u.4">
[663]1172         <table class="tt full left" cellpadding="3" cellspacing="0">
[459]1173            <thead>
1174               <tr>
1175                  <th>Media Type</th>
1176                  <th>Quality Value</th>
1177               </tr>
1178            </thead>
1179            <tbody>
1180               <tr>
[704]1181                  <td class="left">text/html;level=1</td>
1182                  <td class="left">1</td>
[459]1183               </tr>
1184               <tr>
[704]1185                  <td class="left">text/html</td>
1186                  <td class="left">0.7</td>
[459]1187               </tr>
1188               <tr>
[704]1189                  <td class="left">text/plain</td>
1190                  <td class="left">0.3</td>
[459]1191               </tr>
1192               <tr>
[704]1193                  <td class="left">image/jpeg</td>
1194                  <td class="left">0.5</td>
[459]1195               </tr>
1196               <tr>
[704]1197                  <td class="left">text/html;level=2</td>
1198                  <td class="left">0.4</td>
[459]1199               </tr>
1200               <tr>
[704]1201                  <td class="left">text/html;level=3</td>
1202                  <td class="left">0.7</td>
[459]1203               </tr>
1204            </tbody>
1205         </table>
1206      </div>
[966]1207      <p id="rfc.section.6.1.p.19"> <b>Note:</b> A user agent might be provided with a default set of quality values for certain media ranges. However, unless the user agent
[52]1208         is a closed system which cannot interact with other rendering agents, this default set ought to be configurable by the user.
1209      </p>
1210      <div id="rfc.iref.a.2"></div>
1211      <div id="rfc.iref.h.2"></div>
[966]1212      <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;<a id="header.accept-charset" href="#header.accept-charset">Accept-Charset</a></h2>
[1177]1213      <p id="rfc.section.6.2.p.1">The "Accept-Charset" header field can be used by user agents to indicate what character encodings are acceptable in a response
1214         payload. This field allows clients capable of understanding more comprehensive or special-purpose character encodings to signal
1215         that capability to a server which is capable of representing documents in those character encodings.
[52]1216      </p>
[1234]1217      <div id="rfc.figure.u.15"></div><pre class="inline"><span id="rfc.iref.g.15"></span>  <a href="#header.accept-charset" class="smpl">Accept-Charset</a> = 1#( ( <a href="#rule.charset" class="smpl">charset</a> / "*" )
[457]1218                         [ <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> "q=" <a href="#abnf.dependencies" class="smpl">qvalue</a> ] )
[1177]1219</pre><p id="rfc.section.6.2.p.3">Character encoding values (a.k.a., charsets) are described in <a href="#character.sets" title="Character Encodings (charset)">Section&nbsp;2.1</a>. Each charset <em class="bcp14">MAY</em> be given an associated quality value which represents the user's preference for that charset. The default value is q=1. An
[52]1220         example is
1221      </p>
[1167]1222      <div id="rfc.figure.u.16"></div><pre class="text">  Accept-Charset: iso-8859-5, unicode-1-1;q=0.8
[1240]1223</pre><p id="rfc.section.6.2.p.5">The special value "*", if present in the Accept-Charset field, matches every character encoding which is not mentioned elsewhere
1224         in the Accept-Charset field. If no "*" is present in an Accept-Charset field, then all character encodings not explicitly
1225         mentioned get a quality value of 0.
[52]1226      </p>
[1406]1227      <p id="rfc.section.6.2.p.6">A request without any Accept-Charset header field implies that the user agent will accept any character encoding in response.
1228         If an Accept-Charset header field is present in a request and none of the available representations for the response have
1229         a character encoding that is listed as acceptable, the origin server <em class="bcp14">MAY</em> either honor the Accept-Charset header field by sending a 406 (Not Acceptable) response or disregard the Accept-Charset header
1230         field by treating the response as if it is not subject to content negotiation.
[52]1231      </p>
1232      <div id="rfc.iref.a.3"></div>
1233      <div id="rfc.iref.h.3"></div>
[966]1234      <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a>&nbsp;<a id="header.accept-encoding" href="#header.accept-encoding">Accept-Encoding</a></h2>
[1406]1235      <p id="rfc.section.6.3.p.1">The "Accept-Encoding" header field can be used by user agents to indicate what response content-codings (<a href="#content.codings" title="Content Codings">Section&nbsp;2.2</a>) are acceptable in the response. An "identity" token is used as a synonym for "no encoding" in order to communicate when
1236         no encoding is preferred.
[52]1237      </p>
[1234]1238      <div id="rfc.figure.u.17"></div><pre class="inline"><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span>  <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a>  = #( <a href="#header.accept-encoding" class="smpl">codings</a> [ <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> "q=" <a href="#abnf.dependencies" class="smpl">qvalue</a> ] )
[1423]1239  <a href="#header.accept-encoding" class="smpl">codings</a>          = <a href="#content.codings" class="smpl">content-coding</a> / "identity" / "*"
[966]1240</pre><p id="rfc.section.6.3.p.3">Each codings value <em class="bcp14">MAY</em> be given an associated quality value which represents the preference for that encoding. The default value is q=1.
[248]1241      </p>
[1406]1242      <p id="rfc.section.6.3.p.4">For example,</p>
[1167]1243      <div id="rfc.figure.u.18"></div><pre class="text">  Accept-Encoding: compress, gzip
[357]1244  Accept-Encoding:
1245  Accept-Encoding: *
1246  Accept-Encoding: compress;q=0.5, gzip;q=1.0
1247  Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0
[1406]1248</pre><p id="rfc.section.6.3.p.6">A server tests whether a content-coding for a given representation is acceptable, according to an Accept-Encoding field, using
1249         these rules:
1250      </p>
[97]1251      <ol>
1252         <li>The special "*" symbol in an Accept-Encoding field matches any available content-coding not explicitly listed in the header
1253            field.
1254         </li>
[1406]1255         <li>If the representation has no content-coding, then it is acceptable by default unless specifically excluded by the Accept-Encoding
1256            field stating either "identity;q=0" or "*;q=0" without a more specific entry for "identity".
1257         </li>
1258         <li>If the representation's content-coding is one of the content-codings listed in the Accept-Encoding field, then it is acceptable
[1586]1259            unless it is accompanied by a qvalue of 0. (As defined in <a href="p1-messaging.html#quality.values" title="Quality Values">Section 4.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.19"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, a qvalue of 0 means "not acceptable".)
[1406]1260         </li>
[97]1261         <li>If multiple content-codings are acceptable, then the acceptable content-coding with the highest non-zero qvalue is preferred.</li>
1262      </ol>
[1406]1263      <p id="rfc.section.6.3.p.7">An Accept-Encoding header field with a combined field-value that is empty implies that the user agent does not want any content-coding
1264         in response. If an Accept-Encoding header field is present in a request and none of the available representations for the
1265         response have a content-coding that is listed as acceptable, the origin server <em class="bcp14">SHOULD</em> send a response without any content-coding.
[97]1266      </p>
[1406]1267      <p id="rfc.section.6.3.p.8">A request without an Accept-Encoding header field implies that the user agent will accept any content-coding in response,
1268         but a representation without content-coding is preferred for compatibility with the widest variety of user agents.
[97]1269      </p>
[966]1270      <div class="note" id="rfc.section.6.3.p.9"> 
[563]1271         <p> <b>Note:</b> Most HTTP/1.0 applications do not recognize or obey qvalues associated with content-codings. This means that qvalues will
[97]1272            not work and are not permitted with x-gzip or x-compress.
[563]1273         </p> 
1274      </div>
[97]1275      <div id="rfc.iref.a.4"></div>
1276      <div id="rfc.iref.h.4"></div>
[966]1277      <h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a>&nbsp;<a id="header.accept-language" href="#header.accept-language">Accept-Language</a></h2>
[1164]1278      <p id="rfc.section.6.4.p.1">The "Accept-Language" header field can be used by user agents to indicate the set of natural languages that are preferred
[698]1279         in the response. Language tags are defined in <a href="#language.tags" title="Language Tags">Section&nbsp;2.4</a>.
[97]1280      </p>
[1234]1281      <div id="rfc.figure.u.19"></div><pre class="inline"><span id="rfc.iref.g.18"></span><span id="rfc.iref.g.19"></span>  <a href="#header.accept-language" class="smpl">Accept-Language</a> =
[457]1282                    1#( <a href="#header.accept-language" class="smpl">language-range</a> [ <a href="#core.rules" class="smpl">OWS</a> ";" <a href="#core.rules" class="smpl">OWS</a> "q=" <a href="#abnf.dependencies" class="smpl">qvalue</a> ] )
[1234]1283  <a href="#header.accept-language" class="smpl">language-range</a>  =
[303]1284            &lt;language-range, defined in <a href="#RFC4647" id="rfc.xref.RFC4647.1"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="http://tools.ietf.org/html/rfc4647#section-2.1">Section 2.1</a>&gt;
[966]1285</pre><p id="rfc.section.6.4.p.3">Each language-range can be given an associated quality value which represents an estimate of the user's preference for the
[303]1286         languages specified by that range. The quality value defaults to "q=1". For example,
[97]1287      </p>
[1167]1288      <div id="rfc.figure.u.20"></div><pre class="text">  Accept-Language: da, en-gb;q=0.8, en;q=0.7
[966]1289</pre><p id="rfc.section.6.4.p.5">would mean: "I prefer Danish, but will accept British English and other types of English". (see also <a href="http://tools.ietf.org/html/rfc4647#section-2.3">Section 2.3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.2"><cite title="Matching of Language Tags">[RFC4647]</cite></a>)
[97]1290      </p>
[966]1291      <p id="rfc.section.6.4.p.6">For matching, <a href="http://tools.ietf.org/html/rfc4647#section-3">Section 3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.3"><cite title="Matching of Language Tags">[RFC4647]</cite></a> defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements.
[303]1292      </p>
[966]1293      <div class="note" id="rfc.section.6.4.p.7"> 
[756]1294         <p> <b>Note:</b> The "Basic Filtering" scheme (<a href="#RFC4647" id="rfc.xref.RFC4647.4"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="http://tools.ietf.org/html/rfc4647#section-3.3.1">Section 3.3.1</a>) is identical to the matching scheme that was previously defined in <a href="http://tools.ietf.org/html/rfc2616#section-14.4">Section 14.4</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>.
[563]1295         </p> 
1296      </div>
[994]1297      <p id="rfc.section.6.4.p.8">It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic
1298         preferences of the user in every request. For a discussion of this issue, see <a href="#privacy.issues.connected.to.accept.header.fields" title="Privacy Issues Connected to Accept Header Fields">Section&nbsp;8.1</a>.
[97]1299      </p>
[966]1300      <p id="rfc.section.6.4.p.9">As intelligibility is highly dependent on the individual user, it is recommended that client applications make the choice
[563]1301         of linguistic preference available to the user. If the choice is not made available, then the Accept-Language header field <em class="bcp14">MUST NOT</em> be given in the request.
[97]1302      </p>
[966]1303      <div class="note" id="rfc.section.6.4.p.10"> 
[563]1304         <p> <b>Note:</b> When making the choice of linguistic preference available to the user, we remind implementors of the fact that users are not
[970]1305            familiar with the details of language matching as described above, and ought to be provided appropriate guidance. As an example,
[97]1306            users might assume that on selecting "en-gb", they will be served any kind of English document if British English is not available.
1307            A user agent might suggest in such a case to add "en" to get the best matching behavior.
[563]1308         </p> 
1309      </div>
[1406]1310      <div id="rfc.iref.c.6"></div>
[97]1311      <div id="rfc.iref.h.5"></div>
[966]1312      <h2 id="rfc.section.6.5"><a href="#rfc.section.6.5">6.5</a>&nbsp;<a id="header.content-encoding" href="#header.content-encoding">Content-Encoding</a></h2>
[1406]1313      <p id="rfc.section.6.5.p.1">The "Content-Encoding" header field indicates what content-codings have been applied to the representation beyond those inherent
1314         in the media type, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type
1315         header field. Content-Encoding is primarily used to allow a representation to be compressed without losing the identity of
1316         its underlying media type.
[97]1317      </p>
[1234]1318      <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.20"></span>  <a href="#header.content-encoding" class="smpl">Content-Encoding</a> = 1#<a href="#content.codings" class="smpl">content-coding</a>
[966]1319</pre><p id="rfc.section.6.5.p.3">Content codings are defined in <a href="#content.codings" title="Content Codings">Section&nbsp;2.2</a>. An example of its use is
[97]1320      </p>
[1167]1321      <div id="rfc.figure.u.22"></div><pre class="text">  Content-Encoding: gzip
[966]1322</pre><p id="rfc.section.6.5.p.5">The content-coding is a characteristic of the representation. Typically, the representation body is stored with this encoding
[1109]1323         and is only decoded before rendering or analogous usage. However, a transforming proxy <em class="bcp14">MAY</em> modify the content-coding if the new coding is known to be acceptable to the recipient, unless the "no-transform" cache-control
[97]1324         directive is present in the message.
1325      </p>
[1406]1326      <p id="rfc.section.6.5.p.6">If the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would
1327         not be restated as a Content-Encoding even if it happens to be the same algorithm as one of the content-codings. Such a content-coding
1328         would only be listed if, for some bizarre reason, it is applied a second time to form the representation. Likewise, an origin
1329         server might choose to publish the same payload data as multiple representations that differ only in whether the coding is
1330         defined as part of Content-Type or Content-Encoding, since some user agents will behave differently in their handling of each
1331         response (e.g., open a "Save as ..." dialog instead of automatic decompression and rendering of content).
[97]1332      </p>
[1406]1333      <p id="rfc.section.6.5.p.7">A representation that has a content-coding applied to it <em class="bcp14">MUST</em> include a Content-Encoding header field (<a href="#header.content-encoding" id="rfc.xref.header.content-encoding.3" title="Content-Encoding">Section&nbsp;6.5</a>) that lists the content-coding(s) applied.
[97]1334      </p>
[966]1335      <p id="rfc.section.6.5.p.8">If multiple encodings have been applied to a representation, the content codings <em class="bcp14">MUST</em> be listed in the order in which they were applied. Additional information about the encoding parameters <em class="bcp14">MAY</em> be provided by other header fields not defined by this specification.
[97]1336      </p>
[1406]1337      <p id="rfc.section.6.5.p.9">If the content-coding of a representation in a request message is not acceptable to the origin server, the server <em class="bcp14">SHOULD</em> respond with a status code of 415 (Unsupported Media Type).
1338      </p>
1339      <div id="rfc.iref.c.7"></div>
[97]1340      <div id="rfc.iref.h.6"></div>
[966]1341      <h2 id="rfc.section.6.6"><a href="#rfc.section.6.6">6.6</a>&nbsp;<a id="header.content-language" href="#header.content-language">Content-Language</a></h2>
1342      <p id="rfc.section.6.6.p.1">The "Content-Language" header field describes the natural language(s) of the intended audience for the representation. Note
1343         that this might not be equivalent to all the languages used within the representation.
[97]1344      </p>
[1234]1345      <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.21"></span>  <a href="#header.content-language" class="smpl">Content-Language</a> = 1#<a href="#language.tags" class="smpl">language-tag</a>
[966]1346</pre><p id="rfc.section.6.6.p.3">Language tags are defined in <a href="#language.tags" title="Language Tags">Section&nbsp;2.4</a>. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the
[868]1347         user's own preferred language. Thus, if the body content is intended only for a Danish-literate audience, the appropriate
1348         field is
[97]1349      </p>
[1167]1350      <div id="rfc.figure.u.24"></div><pre class="text">  Content-Language: da
[966]1351</pre><p id="rfc.section.6.6.p.5">If no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean
[97]1352         that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language
1353         it is intended.
1354      </p>
[966]1355      <p id="rfc.section.6.6.p.6">Multiple languages <em class="bcp14">MAY</em> be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented
[97]1356         simultaneously in the original Maori and English versions, would call for
1357      </p>
[1167]1358      <div id="rfc.figure.u.25"></div><pre class="text">  Content-Language: mi, en
[966]1359</pre><p id="rfc.section.6.6.p.8">However, just because multiple languages are present within a representation does not mean that it is intended for multiple
[879]1360         linguistic audiences. An example would be a beginner's language primer, such as "A First Lesson in Latin", which is clearly
[868]1361         intended to be used by an English-literate audience. In this case, the Content-Language would properly only include "en".
[97]1362      </p>
[1101]1363      <p id="rfc.section.6.6.p.9">Content-Language <em class="bcp14">MAY</em> be applied to any media type — it is not limited to textual documents.
[97]1364      </p>
[1406]1365      <div id="rfc.iref.c.8"></div>
[97]1366      <div id="rfc.iref.h.7"></div>
[966]1367      <h2 id="rfc.section.6.7"><a href="#rfc.section.6.7">6.7</a>&nbsp;<a id="header.content-location" href="#header.content-location">Content-Location</a></h2>
1368      <p id="rfc.section.6.7.p.1">The "Content-Location" header field supplies a URI that can be used as a specific identifier for the representation in this
[857]1369         message. In other words, if one were to perform a GET on this URI at the time of this message's generation, then a 200 response
1370         would contain the same representation that is enclosed as payload in this message.
[698]1371      </p>
[1234]1372      <div id="rfc.figure.u.26"></div><pre class="inline"><span id="rfc.iref.g.22"></span>  <a href="#header.content-location" class="smpl">Content-Location</a> = <a href="#abnf.dependencies" class="smpl">absolute-URI</a> / <a href="#abnf.dependencies" class="smpl">partial-URI</a>
[1586]1373</pre><p id="rfc.section.6.7.p.3">The Content-Location value is not a replacement for the effective Request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.20"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME
[857]1374         body parts in <a href="http://tools.ietf.org/html/rfc2557#section-4">Section 4</a> of <a href="#RFC2557" id="rfc.xref.RFC2557.1"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a>. However, its appearance in an HTTP message has some special implications for HTTP recipients.
[97]1375      </p>
[966]1376      <p id="rfc.section.6.7.p.4">If Content-Location is included in a response message and its value is the same as the effective request URI, then the response
[857]1377         payload <em class="bcp14">SHOULD</em> be considered the current representation of that resource. For a GET or HEAD request, this is the same as the default semantics
[1162]1378         when no Content-Location is provided by the server. For a state-changing request like PUT or POST, it implies that the server's
[857]1379         response contains the new representation of that resource, thereby distinguishing it from representations that might only
1380         report about the action (e.g., "It worked!"). This allows authoring applications to update their local copies without the
1381         need for a subsequent GET request.
[716]1382      </p>
[966]1383      <p id="rfc.section.6.7.p.5">If Content-Location is included in a response message and its value differs from the effective request URI, then the origin
[857]1384         server is informing recipients that this representation has its own, presumably more specific, identifier. For a GET or HEAD
[966]1385         request, this is an indication that the effective request URI identifies a resource that is subject to content negotiation
[1571]1386         and the selected representation for this response can also be found at the identified URI. For other methods, such a Content-Location
[857]1387         indicates that this representation contains a report on the action's status and the same report is available (for future access
[1162]1388         with GET) at the given URI. For example, a purchase transaction made via a POST request might include a receipt document as
1389         the payload of the 200 response; the Content-Location value provides an identifier for retrieving a copy of that same receipt
[857]1390         in the future.
[97]1391      </p>
[966]1392      <p id="rfc.section.6.7.p.6">If Content-Location is included in a request message, then it <em class="bcp14">MAY</em> be interpreted by the origin server as an indication of where the user agent originally obtained the content of the enclosed
[857]1393         representation (prior to any subsequent modification of the content by that user agent). In other words, the user agent is
1394         providing the same representation metadata that it received with the original representation. However, such interpretation <em class="bcp14">MUST NOT</em> be used to alter the semantics of the method requested by the client. For example, if a client makes a PUT request on a negotiated
1395         resource and the origin server accepts that PUT (without redirection), then the new set of values for that resource is expected
1396         to be consistent with the one representation supplied in that PUT; the Content-Location cannot be used as a form of reverse
1397         content selection that identifies only one of the negotiated representations to be updated. If the user agent had wanted the
1398         latter semantics, it would have applied the PUT directly to the Content-Location URI.
1399      </p>
[966]1400      <p id="rfc.section.6.7.p.7">A Content-Location field received in a request message is transitory information that <em class="bcp14">SHOULD NOT</em> be saved with other representation metadata for use in later responses. The Content-Location's value might be saved for use
[857]1401         in other contexts, such as within source links or other metadata.
1402      </p>
[966]1403      <p id="rfc.section.6.7.p.8">A cache cannot assume that a representation with a Content-Location different from the URI used to retrieve it can be used
[857]1404         to respond to later requests on that Content-Location URI.
1405      </p>
[966]1406      <p id="rfc.section.6.7.p.9">If the Content-Location value is a partial URI, the partial URI is interpreted relative to the effective request URI.</p>
[1406]1407      <div id="rfc.iref.c.9"></div>
[97]1408      <div id="rfc.iref.h.8"></div>
[1267]1409      <h2 id="rfc.section.6.8"><a href="#rfc.section.6.8">6.8</a>&nbsp;<a id="header.content-type" href="#header.content-type">Content-Type</a></h2>
1410      <p id="rfc.section.6.8.p.1">The "Content-Type" header field indicates the media type of the representation. In the case of responses to the HEAD method,
[966]1411         the media type is that which would have been sent had the request been a GET.
[97]1412      </p>
[1267]1413      <div id="rfc.figure.u.27"></div><pre class="inline"><span id="rfc.iref.g.23"></span>  <a href="#header.content-type" class="smpl">Content-Type</a> = <a href="#media.types" class="smpl">media-type</a>
1414</pre><p id="rfc.section.6.8.p.3">Media types are defined in <a href="#media.types" title="Media Types">Section&nbsp;2.3</a>. An example of the field is
[97]1415      </p>
[1267]1416      <div id="rfc.figure.u.28"></div><pre class="text">  Content-Type: text/html; charset=ISO-8859-4
1417</pre><p id="rfc.section.6.8.p.5">Further discussion of Content-Type is provided in <a href="#representation.data" title="Representation Data">Section&nbsp;4.2</a>.
[97]1418      </p>
[966]1419      <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1>
1420      <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a>&nbsp;<a id="header.field.registration" href="#header.field.registration">Header Field Registration</a></h2>
[970]1421      <p id="rfc.section.7.1.p.1">The Message Header Field Registry located at &lt;<a href="http://www.iana.org/assignments/message-headers/message-header-index.html">http://www.iana.org/assignments/message-headers/message-header-index.html</a>&gt; shall be updated with the permanent registrations below (see <a href="#RFC3864" id="rfc.xref.RFC3864.1"><cite title="Registration Procedures for Message Header Fields">[RFC3864]</cite></a>):
[203]1422      </p>
[290]1423      <div id="rfc.table.1">
1424         <div id="iana.header.registration.table"></div>
[663]1425         <table class="tt full left" cellpadding="3" cellspacing="0">
[253]1426            <thead>
1427               <tr>
1428                  <th>Header Field Name</th>
1429                  <th>Protocol</th>
1430                  <th>Status</th>
1431                  <th>Reference</th>
1432               </tr>
1433            </thead>
1434            <tbody>
1435               <tr>
[704]1436                  <td class="left">Accept</td>
1437                  <td class="left">http</td>
1438                  <td class="left">standard</td>
[966]1439                  <td class="left"> <a href="#header.accept" id="rfc.xref.header.accept.3" title="Accept">Section&nbsp;6.1</a> 
[253]1440                  </td>
1441               </tr>
1442               <tr>
[704]1443                  <td class="left">Accept-Charset</td>
1444                  <td class="left">http</td>
1445                  <td class="left">standard</td>
[966]1446                  <td class="left"> <a href="#header.accept-charset" id="rfc.xref.header.accept-charset.2" title="Accept-Charset">Section&nbsp;6.2</a> 
[253]1447                  </td>
1448               </tr>
1449               <tr>
[704]1450                  <td class="left">Accept-Encoding</td>
1451                  <td class="left">http</td>
1452                  <td class="left">standard</td>
[966]1453                  <td class="left"> <a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.3" title="Accept-Encoding">Section&nbsp;6.3</a> 
[253]1454                  </td>
1455               </tr>
1456               <tr>
[704]1457                  <td class="left">Accept-Language</td>
1458                  <td class="left">http</td>
1459                  <td class="left">standard</td>
[966]1460                  <td class="left"> <a href="#header.accept-language" id="rfc.xref.header.accept-language.2" title="Accept-Language">Section&nbsp;6.4</a> 
[253]1461                  </td>
1462               </tr>
1463               <tr>
[704]1464                  <td class="left">Content-Encoding</td>
1465                  <td class="left">http</td>
1466                  <td class="left">standard</td>
[966]1467                  <td class="left"> <a href="#header.content-encoding" id="rfc.xref.header.content-encoding.4" title="Content-Encoding">Section&nbsp;6.5</a> 
[253]1468                  </td>
1469               </tr>
1470               <tr>
[704]1471                  <td class="left">Content-Language</td>
1472                  <td class="left">http</td>
1473                  <td class="left">standard</td>
[966]1474                  <td class="left"> <a href="#header.content-language" id="rfc.xref.header.content-language.2" title="Content-Language">Section&nbsp;6.6</a> 
[253]1475                  </td>
1476               </tr>
1477               <tr>
[704]1478                  <td class="left">Content-Location</td>
1479                  <td class="left">http</td>
1480                  <td class="left">standard</td>
[966]1481                  <td class="left"> <a href="#header.content-location" id="rfc.xref.header.content-location.2" title="Content-Location">Section&nbsp;6.7</a> 
[253]1482                  </td>
1483               </tr>
1484               <tr>
[704]1485                  <td class="left">Content-Type</td>
1486                  <td class="left">http</td>
1487                  <td class="left">standard</td>
[1267]1488                  <td class="left"> <a href="#header.content-type" id="rfc.xref.header.content-type.3" title="Content-Type">Section&nbsp;6.8</a> 
[253]1489                  </td>
1490               </tr>
[291]1491               <tr>
[704]1492                  <td class="left">MIME-Version</td>
1493                  <td class="left">http</td>
[939]1494                  <td class="left">standard</td>
[704]1495                  <td class="left"> <a href="#mime-version" id="rfc.xref.mime-version.1" title="MIME-Version">Appendix&nbsp;A.1</a> 
[291]1496                  </td>
1497               </tr>
[253]1498            </tbody>
1499         </table>
1500      </div>
[966]1501      <p id="rfc.section.7.1.p.2">The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".</p>
1502      <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a>&nbsp;<a id="content.coding.registration" href="#content.coding.registration">Content Coding Registry</a></h2>
1503      <p id="rfc.section.7.2.p.1">The registration procedure for HTTP Content Codings is now defined by <a href="#content.coding.registry" title="Content Coding Registry">Section&nbsp;2.2.1</a> of this document.
[667]1504      </p>
[970]1505      <p id="rfc.section.7.2.p.2">The HTTP Content Codings Registry located at &lt;<a href="http://www.iana.org/assignments/http-parameters">http://www.iana.org/assignments/http-parameters</a>&gt; shall be updated with the registration below:
[673]1506      </p>
[667]1507      <div id="rfc.table.2">
[668]1508         <div id="iana.content.coding.registration.table"></div>
1509         <table class="tt full left" cellpadding="3" cellspacing="0">
1510            <thead>
1511               <tr>
[670]1512                  <th>Name</th>
[668]1513                  <th>Description</th>
1514                  <th>Reference</th>
1515               </tr>
1516            </thead>
1517            <tbody>
1518               <tr>
[704]1519                  <td class="left">compress</td>
1520                  <td class="left">UNIX "compress" program method</td>
[1578]1521                  <td class="left"> <a href="p1-messaging.html#compress.coding" title="Compress Coding">Section 4.2.1</a> of <a href="#Part1" id="rfc.xref.Part1.21"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> 
[668]1522                  </td>
1523               </tr>
1524               <tr>
[704]1525                  <td class="left">deflate</td>
[806]1526                  <td class="left">"deflate" compression mechanism (<a href="#RFC1951" id="rfc.xref.RFC1951.1"><cite title="DEFLATE Compressed Data Format Specification version 1.3">[RFC1951]</cite></a>) used inside the "zlib" data format (<a href="#RFC1950" id="rfc.xref.RFC1950.1"><cite title="ZLIB Compressed Data Format Specification version 3.3">[RFC1950]</cite></a>)
[668]1527                  </td>
[1578]1528                  <td class="left"> <a href="p1-messaging.html#deflate.coding" title="Deflate Coding">Section 4.2.2</a> of <a href="#Part1" id="rfc.xref.Part1.22"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> 
[668]1529                  </td>
1530               </tr>
1531               <tr>
[704]1532                  <td class="left">gzip</td>
1533                  <td class="left">Same as GNU zip <a href="#RFC1952" id="rfc.xref.RFC1952.1"><cite title="GZIP file format specification version 4.3">[RFC1952]</cite></a></td>
[1578]1534                  <td class="left"> <a href="p1-messaging.html#gzip.coding" title="Gzip Coding">Section 4.2.3</a> of <a href="#Part1" id="rfc.xref.Part1.23"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> 
[668]1535                  </td>
1536               </tr>
[1423]1537               <tr>
1538                  <td class="left">identity</td>
1539                  <td class="left">reserved (synonym for "no encoding" in Accept-Encoding header field)</td>
1540                  <td class="left"> <a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.4" title="Accept-Encoding">Section&nbsp;6.3</a> 
1541                  </td>
1542               </tr>
[668]1543            </tbody>
1544         </table>
1545      </div>
[966]1546      <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
1547      <p id="rfc.section.8.p.1">This section is meant to inform application developers, information providers, and users of the security limitations in HTTP/1.1
[97]1548         as described by this document. The discussion does not include definitive solutions to the problems revealed, though it does
1549         make some suggestions for reducing security risks.
1550      </p>
[994]1551      <h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a id="privacy.issues.connected.to.accept.header.fields" href="#privacy.issues.connected.to.accept.header.fields">Privacy Issues Connected to Accept Header Fields</a></h2>
[1514]1552      <p id="rfc.section.8.1.p.1">Accept header fields can reveal information about the user to all servers which are accessed. The Accept-Language header field
1553         in particular can reveal information the user would consider to be of a private nature, because the understanding of particular
1554         languages is often strongly correlated to the membership of a particular ethnic group. User agents which offer the option
1555         to configure the contents of an Accept-Language header field to be sent in every request are strongly encouraged to let the
1556         configuration process include a message which makes the user aware of the loss of privacy involved.
[97]1557      </p>
[994]1558      <p id="rfc.section.8.1.p.2">An approach that limits the loss of privacy would be for a user agent to omit the sending of Accept-Language header fields
1559         by default, and to ask the user whether or not to start sending Accept-Language header fields to a server if it detects, by
[1164]1560         looking for any Vary header fields generated by the server, that such sending could improve the quality of service.
[97]1561      </p>
[966]1562      <p id="rfc.section.8.1.p.3">Elaborate user-customized accept header fields sent in every request, in particular if these include quality values, can be
[97]1563         used by servers as relatively reliable and long-lived user identifiers. Such user identifiers would allow content providers
1564         to do click-trail tracking, and would allow collaborating content providers to match cross-server click-trails or form submissions
1565         of individual users. Note that for many users not behind a proxy, the network address of the host running the user agent will
1566         also serve as a long-lived user identifier. In environments where proxies are used to enhance privacy, user agents ought to
1567         be conservative in offering accept header configuration options to end users. As an extreme privacy measure, proxies could
[994]1568         filter the accept header fields in relayed requests. General purpose user agents which provide a high degree of header configurability <em class="bcp14">SHOULD</em> warn users about the loss of privacy which can be involved.
[97]1569      </p>
[1364]1570      <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;<a id="acks" href="#acks">Acknowledgments</a></h1>
[1586]1571      <p id="rfc.section.9.p.1">See <a href="p1-messaging.html#acks" title="Acknowledgments">Section 9</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>.
[1364]1572      </p>
[966]1573      <h1 id="rfc.references"><a id="rfc.section.10" href="#rfc.section.10">10.</a> References
[97]1574      </h1>
[966]1575      <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References
[119]1576      </h2>
[1267]1577      <table>                           
[97]1578         <tr>
1579            <td class="reference"><b id="Part1">[Part1]</b></td>
[1586]1580            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-latest">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p1-messaging-latest (work in progress), March&nbsp;2012.
[97]1581            </td>
1582         </tr>
1583         <tr>
1584            <td class="reference"><b id="Part2">[Part2]</b></td>
[1586]1585            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-latest">HTTP/1.1, part 2: Message Semantics</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p2-semantics-latest (work in progress), March&nbsp;2012.
[97]1586            </td>
1587         </tr>
1588         <tr>
1589            <td class="reference"><b id="Part4">[Part4]</b></td>
[1586]1590            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-latest">HTTP/1.1, part 4: Conditional Requests</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p4-conditional-latest (work in progress), March&nbsp;2012.
[97]1591            </td>
1592         </tr>
1593         <tr>
1594            <td class="reference"><b id="Part5">[Part5]</b></td>
[1586]1595            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-latest">HTTP/1.1, part 5: Range Requests and Partial Responses</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p5-range-latest (work in progress), March&nbsp;2012.
[97]1596            </td>
1597         </tr>
1598         <tr>
1599            <td class="reference"><b id="Part6">[Part6]</b></td>
[1586]1600            <td class="top"><a href="mailto:fielding@gbiv.com" title="Adobe Systems Incorporated">Fielding, R., Ed.</a>, <a href="mailto:ylafon@w3.org" title="World Wide Web Consortium">Lafon, Y., Ed.</a>, <a href="mailto:mnot@mnot.net" title="Rackspace">Nottingham, M., Ed.</a>, and <a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">J. Reschke, Ed.</a>, “<a href="http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-latest">HTTP/1.1, part 6: Caching</a>”, Internet-Draft&nbsp;draft-ietf-httpbis-p6-cache-latest (work in progress), March&nbsp;2012.
[97]1601            </td>
1602         </tr>
1603         <tr>
[122]1604            <td class="reference"><b id="RFC1950">[RFC1950]</b></td>
[1477]1605            <td class="top"><a href="mailto:ghost@aladdin.com" title="Aladdin Enterprises">Deutsch, L.</a> and J-L. Gailly, “<a href="http://tools.ietf.org/html/rfc1950">ZLIB Compressed Data Format Specification version 3.3</a>”, RFC&nbsp;1950, May&nbsp;1996.
[122]1606            </td>
1607         </tr>
1608         <tr>
[806]1609            <td class="reference"><b id="RFC1951">[RFC1951]</b></td>
[1477]1610            <td class="top"><a href="mailto:ghost@aladdin.com" title="Aladdin Enterprises">Deutsch, P.</a>, “<a href="http://tools.ietf.org/html/rfc1951">DEFLATE Compressed Data Format Specification version 1.3</a>”, RFC&nbsp;1951, May&nbsp;1996.
[806]1611            </td>
1612         </tr>
1613         <tr>
[122]1614            <td class="reference"><b id="RFC1952">[RFC1952]</b></td>
[1477]1615            <td class="top"><a href="mailto:ghost@aladdin.com" title="Aladdin Enterprises">Deutsch, P.</a>, <a href="mailto:gzip@prep.ai.mit.edu">Gailly, J-L.</a>, <a href="mailto:madler@alumni.caltech.edu">Adler, M.</a>, <a href="mailto:ghost@aladdin.com">Deutsch, L.</a>, and <a href="mailto:randeg@alumni.rpi.edu">G. Randers-Pehrson</a>, “<a href="http://tools.ietf.org/html/rfc1952">GZIP file format specification version 4.3</a>”, RFC&nbsp;1952, May&nbsp;1996.
[122]1616            </td>
1617         </tr>
1618         <tr>
[131]1619            <td class="reference"><b id="RFC2045">[RFC2045]</b></td>
[832]1620            <td class="top"><a href="mailto:ned@innosoft.com" title="Innosoft International, Inc.">Freed, N.</a> and <a href="mailto:nsb@nsb.fv.com" title="First Virtual Holdings">N. Borenstein</a>, “<a href="http://tools.ietf.org/html/rfc2045">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>”, RFC&nbsp;2045, November&nbsp;1996.
[131]1621            </td>
1622         </tr>
1623         <tr>
1624            <td class="reference"><b id="RFC2046">[RFC2046]</b></td>
[704]1625            <td class="top"><a href="mailto:ned@innosoft.com" title="Innosoft International, Inc.">Freed, N.</a> and <a href="mailto:nsb@nsb.fv.com" title="First Virtual Holdings">N. Borenstein</a>, “<a href="http://tools.ietf.org/html/rfc2046">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a>”, RFC&nbsp;2046, November&nbsp;1996.
[131]1626            </td>
1627         </tr>
1628         <tr>
[119]1629            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
[704]1630            <td class="top"><a href="mailto:sob@harvard.edu" title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
[119]1631            </td>
1632         </tr>
[303]1633         <tr>
1634            <td class="reference"><b id="RFC4647">[RFC4647]</b></td>
[704]1635            <td class="top"><a href="mailto:addison@inter-locale.com" title="Yahoo! Inc.">Phillips, A., Ed.</a> and <a href="mailto:mark.davis@macchiato.com" title="Google">M. Davis, Ed.</a>, “<a href="http://tools.ietf.org/html/rfc4647">Matching of Language Tags</a>”, BCP&nbsp;47, RFC&nbsp;4647, September&nbsp;2006.
[303]1636            </td>
1637         </tr>
[425]1638         <tr>
1639            <td class="reference"><b id="RFC5234">[RFC5234]</b></td>
[704]1640            <td class="top"><a href="mailto:dcrocker@bbiw.net" title="Brandenburg InternetWorking">Crocker, D., Ed.</a> and <a href="mailto:paul.overell@thus.net" title="THUS plc.">P. Overell</a>, “<a href="http://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>”, STD&nbsp;68, RFC&nbsp;5234, January&nbsp;2008.
[425]1641            </td>
1642         </tr>
[690]1643         <tr>
1644            <td class="reference"><b id="RFC5646">[RFC5646]</b></td>
[704]1645            <td class="top"><a href="mailto:addison@inter-locale.com" title="Lab126">Phillips, A., Ed.</a> and <a href="mailto:mark.davis@google.com" title="Google">M. Davis, Ed.</a>, “<a href="http://tools.ietf.org/html/rfc5646">Tags for Identifying Languages</a>”, BCP&nbsp;47, RFC&nbsp;5646, September&nbsp;2009.
[690]1646            </td>
1647         </tr>
[119]1648      </table>
[966]1649      <h2 id="rfc.references.2"><a href="#rfc.section.10.2" id="rfc.section.10.2">10.2</a> Informative References
[119]1650      </h2>
[1267]1651      <table>                                 
[119]1652         <tr>
[129]1653            <td class="reference"><b id="RFC1945">[RFC1945]</b></td>
[832]1654            <td class="top"><a href="mailto:timbl@w3.org" title="MIT, Laboratory for Computer Science">Berners-Lee, T.</a>, <a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine, Department of Information and Computer Science">Fielding, R.</a>, and <a href="mailto:frystyk@w3.org" title="W3 Consortium, MIT Laboratory for Computer Science">H. Nielsen</a>, “<a href="http://tools.ietf.org/html/rfc1945">Hypertext Transfer Protocol -- HTTP/1.0</a>”, RFC&nbsp;1945, May&nbsp;1996.
[119]1655            </td>
1656         </tr>
1657         <tr>
[129]1658            <td class="reference"><b id="RFC2049">[RFC2049]</b></td>
[832]1659            <td class="top"><a href="mailto:ned@innosoft.com" title="Innosoft International, Inc.">Freed, N.</a> and <a href="mailto:nsb@nsb.fv.com" title="First Virtual Holdings">N. Borenstein</a>, “<a href="http://tools.ietf.org/html/rfc2049">Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples</a>”, RFC&nbsp;2049, November&nbsp;1996.
[97]1660            </td>
1661         </tr>
1662         <tr>
[129]1663            <td class="reference"><b id="RFC2068">[RFC2068]</b></td>
[704]1664            <td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine, Department of Information and Computer Science">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="MIT Laboratory for Computer Science">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Digital Equipment Corporation, Western Research Laboratory">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Nielsen, H.</a>, and <a href="mailto:timbl@w3.org" title="MIT Laboratory for Computer Science">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2068">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2068, January&nbsp;1997.
[97]1665            </td>
1666         </tr>
1667         <tr>
[129]1668            <td class="reference"><b id="RFC2076">[RFC2076]</b></td>
[704]1669            <td class="top"><a href="mailto:jpalme@dsv.su.se" title="Stockholm University/KTH">Palme, J.</a>, “<a href="http://tools.ietf.org/html/rfc2076">Common Internet Message Headers</a>”, RFC&nbsp;2076, February&nbsp;1997.
[97]1670            </td>
1671         </tr>
1672         <tr>
[129]1673            <td class="reference"><b id="RFC2277">[RFC2277]</b></td>
[832]1674            <td class="top"><a href="mailto:Harald.T.Alvestrand@uninett.no" title="UNINETT">Alvestrand, H.</a>, “<a href="http://tools.ietf.org/html/rfc2277">IETF Policy on Character Sets and Languages</a>”, BCP&nbsp;18, RFC&nbsp;2277, January&nbsp;1998.
[97]1675            </td>
1676         </tr>
1677         <tr>
[745]1678            <td class="reference"><b id="RFC2295">[RFC2295]</b></td>
[832]1679            <td class="top"><a href="mailto:koen@win.tue.nl" title="Technische Universiteit Eindhoven">Holtman, K.</a> and <a href="mailto:mutz@hpl.hp.com" title="Hewlett-Packard Company">A. Mutz</a>, “<a href="http://tools.ietf.org/html/rfc2295">Transparent Content Negotiation in HTTP</a>”, RFC&nbsp;2295, March&nbsp;1998.
[745]1680            </td>
1681         </tr>
1682         <tr>
[129]1683            <td class="reference"><b id="RFC2388">[RFC2388]</b></td>
[704]1684            <td class="top"><a href="mailto:masinter@parc.xerox.com" title="Xerox Palo Alto Research Center">Masinter, L.</a>, “<a href="http://tools.ietf.org/html/rfc2388">Returning Values from Forms: multipart/form-data</a>”, RFC&nbsp;2388, August&nbsp;1998.
[97]1685            </td>
1686         </tr>
1687         <tr>
[129]1688            <td class="reference"><b id="RFC2557">[RFC2557]</b></td>
[704]1689            <td class="top"><a href="mailto:jpalme@dsv.su.se" title="Stockholm University and KTH">Palme, F.</a>, <a href="mailto:alexhop@microsoft.com" title="Microsoft Corporation">Hopmann, A.</a>, <a href="mailto:Shelness@lotus.com" title="Lotus Development Corporation">Shelness, N.</a>, and <a href="mailto:stef@nma.com">E. Stefferud</a>, “<a href="http://tools.ietf.org/html/rfc2557">MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)</a>”, RFC&nbsp;2557, March&nbsp;1999.
[97]1690            </td>
1691         </tr>
1692         <tr>
[129]1693            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
[704]1694            <td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
[97]1695            </td>
1696         </tr>
1697         <tr>
[133]1698            <td class="reference"><b id="RFC3629">[RFC3629]</b></td>
[1003]1699            <td class="top"><a href="mailto:fyergeau@alis.com" title="Alis Technologies">Yergeau, F.</a>, “<a href="http://tools.ietf.org/html/rfc3629">UTF-8, a transformation format of ISO 10646</a>”, STD&nbsp;63, RFC&nbsp;3629, November&nbsp;2003.
[97]1700            </td>
1701         </tr>
[200]1702         <tr>
[253]1703            <td class="reference"><b id="RFC3864">[RFC3864]</b></td>
[704]1704            <td class="top"><a href="mailto:GK-IETF@ninebynine.org" title="Nine by Nine">Klyne, G.</a>, <a href="mailto:mnot@pobox.com" title="BEA Systems">Nottingham, M.</a>, and <a href="mailto:JeffMogul@acm.org" title="HP Labs">J. Mogul</a>, “<a href="http://tools.ietf.org/html/rfc3864">Registration Procedures for Message Header Fields</a>”, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.
[253]1705            </td>
1706         </tr>
1707         <tr>
[200]1708            <td class="reference"><b id="RFC4288">[RFC4288]</b></td>
[704]1709            <td class="top"><a href="mailto:ned.freed@mrochek.com" title="Sun Microsystems">Freed, N.</a> and <a href="mailto:klensin+ietf@jck.com">J. Klensin</a>, “<a href="http://tools.ietf.org/html/rfc4288">Media Type Specifications and Registration Procedures</a>”, BCP&nbsp;13, RFC&nbsp;4288, December&nbsp;2005.
[200]1710            </td>
1711         </tr>
[327]1712         <tr>
[670]1713            <td class="reference"><b id="RFC5226">[RFC5226]</b></td>
[704]1714            <td class="top"><a href="mailto:narten@us.ibm.com" title="IBM">Narten, T.</a> and <a href="mailto:Harald@Alvestrand.no" title="Google">H. Alvestrand</a>, “<a href="http://tools.ietf.org/html/rfc5226">Guidelines for Writing an IANA Considerations Section in RFCs</a>”, BCP&nbsp;26, RFC&nbsp;5226, May&nbsp;2008.
[670]1715            </td>
1716         </tr>
1717         <tr>
[327]1718            <td class="reference"><b id="RFC5322">[RFC5322]</b></td>
1719            <td class="top">Resnick, P., “<a href="http://tools.ietf.org/html/rfc5322">Internet Message Format</a>”, RFC&nbsp;5322, October&nbsp;2008.
1720            </td>
1721         </tr>
[1259]1722         <tr>
[1267]1723            <td class="reference"><b id="RFC6151">[RFC6151]</b></td>
1724            <td class="top">Turner, S. and L. Chen, “<a href="http://tools.ietf.org/html/rfc6151">Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms</a>”, RFC&nbsp;6151, March&nbsp;2011.
1725            </td>
1726         </tr>
1727         <tr>
[1307]1728            <td class="reference"><b id="RFC6266">[RFC6266]</b></td>
1729            <td class="top"><a href="mailto:julian.reschke@greenbytes.de" title="greenbytes GmbH">Reschke, J.</a>, “<a href="http://tools.ietf.org/html/rfc6266">Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)</a>”, RFC&nbsp;6266, June&nbsp;2011.
[1259]1730            </td>
1731         </tr>
[129]1732      </table>
[662]1733      <div class="avoidbreak">
1734         <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1>
1735         <address class="vcard"><span class="vcardline"><span class="fn">Roy T. Fielding</span>
1736               (editor)
[1106]1737               <span class="n hidden"><span class="family-name">Fielding</span><span class="given-name">Roy T.</span></span></span><span class="org vcardline">Adobe Systems Incorporated</span><span class="adr"><span class="street-address vcardline">345 Park Ave</span><span class="vcardline"><span class="locality">San Jose</span>, <span class="region">CA</span>&nbsp;<span class="postal-code">95110</span></span><span class="country-name vcardline">USA</span></span><span class="vcardline">Email: <a href="mailto:fielding@gbiv.com"><span class="email">fielding@gbiv.com</span></a></span><span class="vcardline">URI: <a href="http://roy.gbiv.com/" class="url">http://roy.gbiv.com/</a></span></address>
[662]1738         <address class="vcard"><span class="vcardline"><span class="fn">Yves Lafon</span>
1739               (editor)
[799]1740               <span class="n hidden"><span class="family-name">Lafon</span><span class="given-name">Yves</span></span></span><span class="org vcardline">World Wide Web Consortium</span><span class="adr"><span class="street-address vcardline">W3C / ERCIM</span><span class="street-address vcardline">2004, rte des Lucioles</span><span class="vcardline"><span class="locality">Sophia-Antipolis</span>, <span class="region">AM</span>&nbsp;<span class="postal-code">06902</span></span><span class="country-name vcardline">France</span></span><span class="vcardline">Email: <a href="mailto:ylafon@w3.org"><span class="email">ylafon@w3.org</span></a></span><span class="vcardline">URI: <a href="http://www.raubacapeu.net/people/yves/" class="url">http://www.raubacapeu.net/people/yves/</a></span></address>
[662]1741         <address class="vcard"><span class="vcardline"><span class="fn">Julian F. Reschke</span>
1742               (editor)
[799]1743               <span class="n hidden"><span class="family-name">Reschke</span><span class="given-name">Julian F.</span></span></span><span class="org vcardline">greenbytes GmbH</span><span class="adr"><span class="street-address vcardline">Hafenweg 16</span><span class="vcardline"><span class="locality">Muenster</span>, <span class="region">NW</span>&nbsp;<span class="postal-code">48155</span></span><span class="country-name vcardline">Germany</span></span><span class="vcardline tel">Phone: <a href="tel:+492512807760"><span class="value">+49 251 2807760</span></a></span><span class="vcardline tel"><span class="type">Fax</span>: <a href="fax:+492512807761"><span class="value">+49 251 2807761</span></a></span><span class="vcardline">Email: <a href="mailto:julian.reschke@greenbytes.de"><span class="email">julian.reschke@greenbytes.de</span></a></span><span class="vcardline">URI: <a href="http://greenbytes.de/tech/webdav/" class="url">http://greenbytes.de/tech/webdav/</a></span></address>
[662]1744      </div>
[875]1745      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="differences.between.http.and.mime" href="#differences.between.http.and.mime">Differences between HTTP and MIME</a></h1>
[1544]1746      <p id="rfc.section.A.p.1">HTTP/1.1 uses many of the constructs defined for Internet Mail (<a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a>) and the Multipurpose Internet Mail Extensions (MIME <a href="#RFC2045" id="rfc.xref.RFC2045.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a>) to allow a message body to be transmitted in an open variety of representations and with extensible mechanisms. However,
[875]1747         RFC 2045 discusses mail, and HTTP has a few features that are different from those described in MIME. These differences were
1748         carefully chosen to optimize performance over binary connections, to allow greater freedom in the use of new media types,
1749         to make date comparisons easier, and to acknowledge the practice of some early HTTP servers and clients.
[97]1750      </p>
[875]1751      <p id="rfc.section.A.p.2">This appendix describes specific areas where HTTP differs from MIME. Proxies and gateways to strict MIME environments <em class="bcp14">SHOULD</em> be aware of these differences and provide the appropriate conversions where necessary. Proxies and gateways from MIME environments
[97]1752         to HTTP also need to be aware of the differences because some conversions might be required.
1753      </p>
[291]1754      <div id="rfc.iref.m.1"></div>
[1267]1755      <div id="rfc.iref.h.9"></div>
[97]1756      <h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a id="mime-version" href="#mime-version">MIME-Version</a></h2>
[1164]1757      <p id="rfc.section.A.1.p.1">HTTP is not a MIME-compliant protocol. However, HTTP/1.1 messages <em class="bcp14">MAY</em> include a single MIME-Version header field to indicate what version of the MIME protocol was used to construct the message.
[1520]1758         Use of the MIME-Version header field indicates that the message is in full conformance with the MIME protocol (as defined
1759         in <a href="#RFC2045" id="rfc.xref.RFC2045.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies">[RFC2045]</cite></a>). Proxies/gateways are responsible for ensuring full conformance (where possible) when exporting HTTP messages to strict
1760         MIME environments.
[97]1761      </p>
[1267]1762      <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.24"></span>  <a href="#mime-version" class="smpl">MIME-Version</a> = 1*<a href="#notation" class="smpl">DIGIT</a> "." 1*<a href="#notation" class="smpl">DIGIT</a>
[97]1763</pre><p id="rfc.section.A.1.p.3">MIME version "1.0" is the default for use in HTTP/1.1. However, HTTP/1.1 message parsing and semantics are defined by this
1764         document and not the MIME specification.
1765      </p>
1766      <h2 id="rfc.section.A.2"><a href="#rfc.section.A.2">A.2</a>&nbsp;<a id="conversion.to.canonical.form" href="#conversion.to.canonical.form">Conversion to Canonical Form</a></h2>
[875]1767      <p id="rfc.section.A.2.p.1">MIME requires that an Internet mail body-part be converted to canonical form prior to being transferred, as described in <a href="http://tools.ietf.org/html/rfc2049#section-4">Section 4</a> of <a href="#RFC2049" id="rfc.xref.RFC2049.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples">[RFC2049]</cite></a>. <a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;2.3.1</a> of this document describes the forms allowed for subtypes of the "text" media type when transmitted over HTTP. <a href="#RFC2046" id="rfc.xref.RFC2046.4"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> requires that content with a type of "text" represent line breaks as CRLF and forbids the use of CR or LF outside of line
[97]1768         break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate a line break within text content when a message is transmitted
1769         over HTTP.
1770      </p>
[424]1771      <p id="rfc.section.A.2.p.2">Where it is possible, a proxy or gateway from HTTP to a strict MIME environment <em class="bcp14">SHOULD</em> translate all line breaks within the text media types described in <a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;2.3.1</a> of this document to the RFC 2049 canonical form of CRLF. Note, however, that this might be complicated by the presence of
[1177]1772         a Content-Encoding and by the fact that HTTP allows the use of some character encodings which do not use octets 13 and 10
1773         to represent CR and LF, respectively, as is the case for some multi-byte character encodings.
[97]1774      </p>
[970]1775      <p id="rfc.section.A.2.p.3">Conversion will break any cryptographic checksums applied to the original content unless the original content is already in
1776         canonical form. Therefore, the canonical form is recommended for any content that uses such checksums in HTTP.
[97]1777      </p>
[385]1778      <h2 id="rfc.section.A.3"><a href="#rfc.section.A.3">A.3</a>&nbsp;<a id="conversion.of.date.formats" href="#conversion.of.date.formats">Conversion of Date Formats</a></h2>
[1440]1779      <p id="rfc.section.A.3.p.1">HTTP/1.1 uses a restricted set of date formats (<a href="p2-semantics.html#http.date" title="Date/Time Formats">Section 8</a> of <a href="#Part2" id="rfc.xref.Part2.2"><cite title="HTTP/1.1, part 2: Message Semantics">[Part2]</cite></a>) to simplify the process of date comparison. Proxies and gateways from other protocols <em class="bcp14">SHOULD</em> ensure that any Date header field present in a message conforms to one of the HTTP/1.1 formats and rewrite the date if necessary.
[385]1780      </p>
1781      <h2 id="rfc.section.A.4"><a href="#rfc.section.A.4">A.4</a>&nbsp;<a id="introduction.of.content-encoding" href="#introduction.of.content-encoding">Introduction of Content-Encoding</a></h2>
[875]1782      <p id="rfc.section.A.4.p.1">MIME does not include any concept equivalent to HTTP/1.1's Content-Encoding header field. Since this acts as a modifier on
1783         the media type, proxies and gateways from HTTP to MIME-compliant protocols <em class="bcp14">MUST</em> either change the value of the Content-Type header field or decode the representation before forwarding the message. (Some
1784         experimental applications of Content-Type for Internet mail have used a media-type parameter of ";conversions=&lt;content-coding&gt;"
1785         to perform a function equivalent to Content-Encoding. However, this parameter is not part of the MIME standards).
[97]1786      </p>
[1506]1787      <div id="rfc.iref.c.10"></div>
1788      <div id="rfc.iref.h.10"></div>
[385]1789      <h2 id="rfc.section.A.5"><a href="#rfc.section.A.5">A.5</a>&nbsp;<a id="no.content-transfer-encoding" href="#no.content-transfer-encoding">No Content-Transfer-Encoding</a></h2>
[875]1790      <p id="rfc.section.A.5.p.1">HTTP does not use the Content-Transfer-Encoding field of MIME. Proxies and gateways from MIME-compliant protocols to HTTP <em class="bcp14">MUST</em> remove any Content-Transfer-Encoding prior to delivering the response message to an HTTP client.
[97]1791      </p>
[385]1792      <p id="rfc.section.A.5.p.2">Proxies and gateways from HTTP to MIME-compliant protocols are responsible for ensuring that the message is in the correct
[97]1793         format and encoding for safe transport on that protocol, where "safe transport" is defined by the limitations of the protocol
1794         being used. Such a proxy or gateway <em class="bcp14">SHOULD</em> label the data with an appropriate Content-Transfer-Encoding if doing so will improve the likelihood of safe transport over
1795         the destination protocol.
1796      </p>
[385]1797      <h2 id="rfc.section.A.6"><a href="#rfc.section.A.6">A.6</a>&nbsp;<a id="introduction.of.transfer-encoding" href="#introduction.of.transfer-encoding">Introduction of Transfer-Encoding</a></h2>
[1544]1798      <p id="rfc.section.A.6.p.1">HTTP/1.1 introduces the Transfer-Encoding header field (<a href="p1-messaging.html#header.transfer-encoding" title="Transfer-Encoding">Section 3.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.25"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). Proxies/gateways <em class="bcp14">MUST</em> remove any transfer-coding prior to forwarding a message via a MIME-compliant protocol.
[97]1799      </p>
[385]1800      <h2 id="rfc.section.A.7"><a href="#rfc.section.A.7">A.7</a>&nbsp;<a id="mhtml.line.length" href="#mhtml.line.length">MHTML and Line Length Limitations</a></h2>
[857]1801      <p id="rfc.section.A.7.p.1">HTTP implementations which share code with MHTML <a href="#RFC2557" id="rfc.xref.RFC2557.2"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a> implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation, HTTP does not
[97]1802         fold long lines. MHTML messages being transported by HTTP follow all conventions of MHTML, including line length limitations
[424]1803         and folding, canonicalization, etc., since HTTP transports all message-bodies as payload (see <a href="#multipart.types" title="Multipart Types">Section&nbsp;2.3.2</a>) and does not interpret the content or any MIME header lines that might be contained therein.
[97]1804      </p>
1805      <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="additional.features" href="#additional.features">Additional Features</a></h1>
[1477]1806      <p id="rfc.section.B.p.1"> <a href="#RFC1945" id="rfc.xref.RFC1945.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a> and <a href="#RFC2068" id="rfc.xref.RFC2068.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a> document protocol elements used by some existing HTTP implementations, but not consistently and correctly across most HTTP/1.1
[97]1807         applications. Implementors are advised to be aware of these features, but cannot rely upon their presence in, or interoperability
1808         with, other HTTP/1.1 applications. Some of these describe proposed experimental features, and some describe features that
1809         experimental deployment found lacking that are now addressed in the base HTTP/1.1 specification.
1810      </p>
[1307]1811      <p id="rfc.section.B.p.2">A number of other header fields, such as Content-Disposition and Title, from SMTP and MIME are also often implemented (see <a href="#RFC6266" id="rfc.xref.RFC6266.1"><cite title="Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)">[RFC6266]</cite></a> and <a href="#RFC2076" id="rfc.xref.RFC2076.1"><cite title="Common Internet Message Headers">[RFC2076]</cite></a>).
[97]1812      </p>
[912]1813      <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="changes.from.rfc.2616" href="#changes.from.rfc.2616">Changes from RFC 2616</a></h1>
[1177]1814      <p id="rfc.section.C.p.1">Clarify contexts that charset is used in. (<a href="#character.sets" title="Character Encodings (charset)">Section&nbsp;2.1</a>)
[97]1815      </p>
[1567]1816      <p id="rfc.section.C.p.2">Registration of Content Codings now requires IETF Review (<a href="#content.coding.registry" title="Content Coding Registry">Section&nbsp;2.2.1</a>)
[1234]1817      </p>
[1567]1818      <p id="rfc.section.C.p.3">Remove the default character encoding for text media types; the default now is whatever the media type definition says. (<a href="#canonicalization.and.text.defaults" title="Canonicalization and Text Defaults">Section&nbsp;2.3.1</a>)
[1240]1819      </p>
[1567]1820      <p id="rfc.section.C.p.4">Change ABNF productions for header fields to only define the field value. (<a href="#header.field.definitions" title="Header Field Definitions">Section&nbsp;6</a>)
1821      </p>
1822      <p id="rfc.section.C.p.5">Remove definition of Content-MD5 header field because it was inconsistently implemented with respect to partial responses,
[1415]1823         and also because of known deficiencies in the hash algorithm itself (see <a href="#RFC6151" id="rfc.xref.RFC6151.1"><cite title="Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms">[RFC6151]</cite></a> for details). (<a href="#header.field.definitions" title="Header Field Definitions">Section&nbsp;6</a>)
[1240]1824      </p>
[1567]1825      <p id="rfc.section.C.p.6">Remove ISO-8859-1 special-casing in Accept-Charset. (<a href="#header.accept-charset" id="rfc.xref.header.accept-charset.3" title="Accept-Charset">Section&nbsp;6.2</a>)
[1267]1826      </p>
[1567]1827      <p id="rfc.section.C.p.7">Remove base URI setting semantics for Content-Location due to poor implementation support, which was caused by too many broken
[994]1828         servers emitting bogus Content-Location header fields, and also the potentially undesirable effect of potentially breaking
1829         relative links in content-negotiated resources. (<a href="#header.content-location" id="rfc.xref.header.content-location.3" title="Content-Location">Section&nbsp;6.7</a>)
[104]1830      </p>
[1567]1831      <p id="rfc.section.C.p.8">Remove reference to non-existant identity transfer-coding value tokens. (<a href="#no.content-transfer-encoding" id="rfc.xref.no.content-transfer-encoding.1" title="No Content-Transfer-Encoding">Appendix&nbsp;A.5</a>)
[712]1832      </p>
[1567]1833      <p id="rfc.section.C.p.9">Remove discussion of Content-Disposition header field, it is now defined by <a href="#RFC6266" id="rfc.xref.RFC6266.2"><cite title="Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)">[RFC6266]</cite></a>. (<a href="#additional.features" title="Additional Features">Appendix&nbsp;B</a>)
[1259]1834      </p>
[421]1835      <h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a>&nbsp;<a id="collected.abnf" href="#collected.abnf">Collected ABNF</a></h1>
[1267]1836      <div id="rfc.figure.u.30"></div> <pre class="inline"><a href="#header.accept" class="smpl">Accept</a> = [ ( "," / ( media-range [ accept-params ] ) ) *( OWS "," [
[1234]1837 OWS media-range [ accept-params ] ] ) ]
1838<a href="#header.accept-charset" class="smpl">Accept-Charset</a> = *( "," OWS ) ( charset / "*" ) [ OWS ";" OWS "q="
[421]1839 qvalue ] *( OWS "," [ OWS ( charset / "*" ) [ OWS ";" OWS "q="
1840 qvalue ] ] )
[1234]1841<a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> = [ ( "," / ( codings [ OWS ";" OWS "q=" qvalue ] ) )
1842 *( OWS "," [ OWS codings [ OWS ";" OWS "q=" qvalue ] ] ) ]
1843<a href="#header.accept-language" class="smpl">Accept-Language</a> = *( "," OWS ) language-range [ OWS ";" OWS "q="
[421]1844 qvalue ] *( OWS "," [ OWS language-range [ OWS ";" OWS "q=" qvalue ]
1845 ] )
[428]1846
[1234]1847<a href="#header.content-encoding" class="smpl">Content-Encoding</a> = *( "," OWS ) content-coding *( OWS "," [ OWS
[421]1848 content-coding ] )
[1234]1849<a href="#header.content-language" class="smpl">Content-Language</a> = *( "," OWS ) language-tag *( OWS "," [ OWS
[421]1850 language-tag ] )
[1234]1851<a href="#header.content-location" class="smpl">Content-Location</a> = absolute-URI / partial-URI
1852<a href="#header.content-type" class="smpl">Content-Type</a> = media-type
[427]1853
[1234]1854<a href="#mime-version" class="smpl">MIME-Version</a> = 1*DIGIT "." 1*DIGIT
[427]1855
[1523]1856<a href="#core.rules" class="smpl">OWS</a> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
[427]1857
[1318]1858<a href="#abnf.dependencies" class="smpl">absolute-URI</a> = &lt;absolute-URI, defined in [Part1], Section 2.7&gt;
[810]1859<a href="#header.accept" class="smpl">accept-ext</a> = OWS ";" OWS token [ "=" word ]
[427]1860<a href="#header.accept" class="smpl">accept-params</a> = OWS ";" OWS "q=" qvalue *accept-ext
1861<a href="#rule.parameter" class="smpl">attribute</a> = token
1862
1863<a href="#rule.charset" class="smpl">charset</a> = token
[1410]1864<a href="#header.accept-encoding" class="smpl">codings</a> = content-coding / "identity" / "*"
[427]1865<a href="#content.codings" class="smpl">content-coding</a> = token
[428]1866
[427]1867<a href="#header.accept-language" class="smpl">language-range</a> = &lt;language-range, defined in [RFC4647], Section 2.1&gt;
[690]1868<a href="#language.tags" class="smpl">language-tag</a> = &lt;Language-Tag, defined in [RFC5646], Section 2.1&gt;
[427]1869
1870<a href="#header.accept" class="smpl">media-range</a> = ( "*/*" / ( type "/*" ) / ( type "/" subtype ) ) *( OWS
[421]1871 ";" OWS parameter )
[427]1872<a href="#media.types" class="smpl">media-type</a> = type "/" subtype *( OWS ";" OWS parameter )
1873
1874<a href="#rule.parameter" class="smpl">parameter</a> = attribute "=" value
[1318]1875<a href="#abnf.dependencies" class="smpl">partial-URI</a> = &lt;partial-URI, defined in [Part1], Section 2.7&gt;
[427]1876
[1587]1877<a href="#abnf.dependencies" class="smpl">qvalue</a> = &lt;qvalue, defined in [Part1], Section 4.3.1&gt;
[427]1878
1879<a href="#media.types" class="smpl">subtype</a> = token
1880
[1523]1881<a href="#core.rules" class="smpl">token</a> = &lt;token, defined in [Part1], Section 3.2.4&gt;
[427]1882<a href="#media.types" class="smpl">type</a> = token
1883
[810]1884<a href="#rule.parameter" class="smpl">value</a> = word
1885
[1523]1886<a href="#core.rules" class="smpl">word</a> = &lt;word, defined in [Part1], Section 3.2.4&gt;
[1267]1887</pre> <div id="rfc.figure.u.31"></div>
[454]1888      <p>ABNF diagnostics:</p><pre class="inline">; Accept defined but not used
[421]1889; Accept-Charset defined but not used
1890; Accept-Encoding defined but not used
1891; Accept-Language defined but not used
[968]1892; Content-Encoding defined but not used
1893; Content-Language defined but not used
1894; Content-Location defined but not used
1895; Content-Type defined but not used
[421]1896; MIME-Version defined but not used
[454]1897</pre><h1 id="rfc.section.E"><a href="#rfc.section.E">E.</a>&nbsp;<a id="change.log" href="#change.log">Change Log (to be removed by RFC Editor before publication)</a></h1>
[1002]1898      <h2 id="rfc.section.E.1"><a href="#rfc.section.E.1">E.1</a>&nbsp;Since RFC 2616
[115]1899      </h2>
[724]1900      <p id="rfc.section.E.1.p.1">Extracted relevant partitions from <a href="#RFC2616" id="rfc.xref.RFC2616.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>.
[115]1901      </p>
[421]1902      <h2 id="rfc.section.E.2"><a href="#rfc.section.E.2">E.2</a>&nbsp;Since draft-ietf-httpbis-p3-payload-00
[115]1903      </h2>
[421]1904      <p id="rfc.section.E.2.p.1">Closed issues: </p>
[116]1905      <ul>
[324]1906         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/8">http://tools.ietf.org/wg/httpbis/trac/ticket/8</a>&gt;: "Media Type Registrations" (&lt;<a href="http://purl.org/NET/http-errata#media-reg">http://purl.org/NET/http-errata#media-reg</a>&gt;)
[116]1907         </li>
[324]1908         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/14">http://tools.ietf.org/wg/httpbis/trac/ticket/14</a>&gt;: "Clarification regarding quoting of charset values" (&lt;<a href="http://purl.org/NET/http-errata#charactersets">http://purl.org/NET/http-errata#charactersets</a>&gt;)
[116]1909         </li>
[324]1910         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/16">http://tools.ietf.org/wg/httpbis/trac/ticket/16</a>&gt;: "Remove 'identity' token references" (&lt;<a href="http://purl.org/NET/http-errata#identity">http://purl.org/NET/http-errata#identity</a>&gt;)
[116]1911         </li>
[324]1912         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/25">http://tools.ietf.org/wg/httpbis/trac/ticket/25</a>&gt;: "Accept-Encoding BNF"
[126]1913         </li>
[324]1914         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/35">http://tools.ietf.org/wg/httpbis/trac/ticket/35</a>&gt;: "Normative and Informative references"
[152]1915         </li>
[324]1916         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/46">http://tools.ietf.org/wg/httpbis/trac/ticket/46</a>&gt;: "RFC1700 references"
[116]1917         </li>
[324]1918         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/55">http://tools.ietf.org/wg/httpbis/trac/ticket/55</a>&gt;: "Updating to RFC4288"
[200]1919         </li>
[324]1920         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/65">http://tools.ietf.org/wg/httpbis/trac/ticket/65</a>&gt;: "Informative references"
[129]1921         </li>
[324]1922         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/66">http://tools.ietf.org/wg/httpbis/trac/ticket/66</a>&gt;: "ISO-8859-1 Reference"
[123]1923         </li>
[324]1924         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/68">http://tools.ietf.org/wg/httpbis/trac/ticket/68</a>&gt;: "Encoding References Normative"
[122]1925         </li>
[324]1926         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/86">http://tools.ietf.org/wg/httpbis/trac/ticket/86</a>&gt;: "Normative up-to-date references"
[131]1927         </li>
[116]1928      </ul>
[421]1929      <h2 id="rfc.section.E.3"><a href="#rfc.section.E.3">E.3</a>&nbsp;Since draft-ietf-httpbis-p3-payload-01
[170]1930      </h2>
[421]1931      <p id="rfc.section.E.3.p.1">Ongoing work on ABNF conversion (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>&gt;):
[205]1932      </p>
1933      <ul>
1934         <li>Add explicit references to BNF syntax and rules imported from other parts of the specification.</li>
1935      </ul>
[421]1936      <h2 id="rfc.section.E.4"><a href="#rfc.section.E.4">E.4</a>&nbsp;<a id="changes.since.02" href="#changes.since.02">Since draft-ietf-httpbis-p3-payload-02</a></h2>
1937      <p id="rfc.section.E.4.p.1">Closed issues: </p>
[232]1938      <ul>
[324]1939         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/67">http://tools.ietf.org/wg/httpbis/trac/ticket/67</a>&gt;: "Quoting Charsets"
[251]1940         </li>
[324]1941         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/105">http://tools.ietf.org/wg/httpbis/trac/ticket/105</a>&gt;: "Classification for Allow header"
[232]1942         </li>
[324]1943         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/115">http://tools.ietf.org/wg/httpbis/trac/ticket/115</a>&gt;: "missing default for qvalue in description of Accept-Encoding"
[248]1944         </li>
[232]1945      </ul>
[994]1946      <p id="rfc.section.E.4.p.2">Ongoing work on IANA Message Header Field Registration (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/40">http://tools.ietf.org/wg/httpbis/trac/ticket/40</a>&gt;):
[253]1947      </p>
1948      <ul>
[994]1949         <li>Reference RFC 3984, and update header field registrations for headers defined in this document.</li>
[253]1950      </ul>
[421]1951      <h2 id="rfc.section.E.5"><a href="#rfc.section.E.5">E.5</a>&nbsp;<a id="changes.since.03" href="#changes.since.03">Since draft-ietf-httpbis-p3-payload-03</a></h2>
1952      <p id="rfc.section.E.5.p.1">Closed issues: </p>
[269]1953      <ul>
[297]1954         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/67">http://tools.ietf.org/wg/httpbis/trac/ticket/67</a>&gt;: "Quoting Charsets"
1955         </li>
[303]1956         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/113">http://tools.ietf.org/wg/httpbis/trac/ticket/113</a>&gt;: "language tag matching (Accept-Language) vs RFC4647"
1957         </li>
[277]1958         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/121">http://tools.ietf.org/wg/httpbis/trac/ticket/121</a>&gt;: "RFC 1806 has been replaced by RFC2183"
[269]1959         </li>
1960      </ul>
[421]1961      <p id="rfc.section.E.5.p.2">Other changes: </p>
[277]1962      <ul>
[1477]1963         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/68">http://tools.ietf.org/wg/httpbis/trac/ticket/68</a>&gt;: "Encoding References Normative" — rephrase the annotation and reference BCP97.
[277]1964         </li>
1965      </ul>
[421]1966      <h2 id="rfc.section.E.6"><a href="#rfc.section.E.6">E.6</a>&nbsp;<a id="changes.since.04" href="#changes.since.04">Since draft-ietf-httpbis-p3-payload-04</a></h2>
1967      <p id="rfc.section.E.6.p.1">Closed issues: </p>
[327]1968      <ul>
1969         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/132">http://tools.ietf.org/wg/httpbis/trac/ticket/132</a>&gt;: "RFC 2822 is updated by RFC 5322"
1970         </li>
1971      </ul>
[421]1972      <p id="rfc.section.E.6.p.2">Ongoing work on ABNF conversion (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>&gt;):
[334]1973      </p>
1974      <ul>
1975         <li>Use "/" instead of "|" for alternatives.</li>
[357]1976         <li>Introduce new ABNF rules for "bad" whitespace ("BWS"), optional whitespace ("OWS") and required whitespace ("RWS").</li>
[994]1977         <li>Rewrite ABNFs to spell out whitespace rules, factor out header field value format definitions.</li>
[334]1978      </ul>
[421]1979      <h2 id="rfc.section.E.7"><a href="#rfc.section.E.7">E.7</a>&nbsp;<a id="changes.since.05" href="#changes.since.05">Since draft-ietf-httpbis-p3-payload-05</a></h2>
1980      <p id="rfc.section.E.7.p.1">Closed issues: </p>
[385]1981      <ul>
1982         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/118">http://tools.ietf.org/wg/httpbis/trac/ticket/118</a>&gt;: "Join "Differences Between HTTP Entities and RFC 2045 Entities"?"
1983         </li>
1984      </ul>
[543]1985      <p id="rfc.section.E.7.p.2">Final work on ABNF conversion (&lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/36">http://tools.ietf.org/wg/httpbis/trac/ticket/36</a>&gt;):
[421]1986      </p>
1987      <ul>
[424]1988         <li>Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.</li>
[421]1989      </ul>
[457]1990      <p id="rfc.section.E.7.p.3">Other changes: </p>
1991      <ul>
1992         <li>Move definition of quality values into Part 1.</li>
1993      </ul>
[547]1994      <h2 id="rfc.section.E.8"><a href="#rfc.section.E.8">E.8</a>&nbsp;<a id="changes.since.06" href="#changes.since.06">Since draft-ietf-httpbis-p3-payload-06</a></h2>
[577]1995      <p id="rfc.section.E.8.p.1">Closed issues: </p>
1996      <ul>
1997         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/80">http://tools.ietf.org/wg/httpbis/trac/ticket/80</a>&gt;: "Content-Location isn't special"
1998         </li>
[592]1999         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/155">http://tools.ietf.org/wg/httpbis/trac/ticket/155</a>&gt;: "Content Sniffing"
2000         </li>
[577]2001      </ul>
[604]2002      <h2 id="rfc.section.E.9"><a href="#rfc.section.E.9">E.9</a>&nbsp;<a id="changes.since.07" href="#changes.since.07">Since draft-ietf-httpbis-p3-payload-07</a></h2>
[613]2003      <p id="rfc.section.E.9.p.1">Closed issues: </p>
2004      <ul>
[670]2005         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/13">http://tools.ietf.org/wg/httpbis/trac/ticket/13</a>&gt;: "Updated reference for language tags"
[613]2006         </li>
[716]2007         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/110">http://tools.ietf.org/wg/httpbis/trac/ticket/110</a>&gt;: "Clarify rules for determining what entities a response carries"
2008         </li>
[712]2009         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/154">http://tools.ietf.org/wg/httpbis/trac/ticket/154</a>&gt;: "Content-Location base-setting problems"
2010         </li>
[663]2011         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/155">http://tools.ietf.org/wg/httpbis/trac/ticket/155</a>&gt;: "Content Sniffing"
2012         </li>
[670]2013         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/188">http://tools.ietf.org/wg/httpbis/trac/ticket/188</a>&gt;: "pick IANA policy (RFC5226) for Transfer Coding / Content Coding"
2014         </li>
[673]2015         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/189">http://tools.ietf.org/wg/httpbis/trac/ticket/189</a>&gt;: "move definitions of gzip/deflate/compress to part 1"