source: draft-ietf-httpbis-content-disp/latest/draft-ietf-httpbis-content-disp.html @ 1191

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

prepare -08

  • Property svn:eol-style set to native
File size: 70.1 KB
1<!DOCTYPE html
2  PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html lang="en">
4   <head profile="">
5      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6      <title>Use of the Content-Disposition&nbsp;Header&nbsp;Field
7         in the Hypertext&nbsp;Transfer&nbsp;Protocol&nbsp;(HTTP)
8      </title><style type="text/css" title="Xml2Rfc (sans serif)">
9a {
10  text-decoration: none;
12a.smpl {
13  color: black;
15a:hover {
16  text-decoration: underline;
18a:active {
19  text-decoration: underline;
21address {
22  margin-top: 1em;
23  margin-left: 2em;
24  font-style: normal;
26blockquote {
27  border-style: solid;
28  border-color: gray;
29  border-width: 0 0 0 .25em;
30  font-style: italic;
31  padding-left: 0.5em;
33body {
34  color: black;
35  font-family: verdana, helvetica, arial, sans-serif;
36  font-size: 10pt;
38cite {
39  font-style: normal;
41div.note {
42  margin-left: 2em;
44dd {
45  margin-right: 2em;
47dl {
48  margin-left: 2em;
51ul.empty {
52  list-style-type: none;
54ul.empty li {
55  margin-top: .5em;
57dl p {
58  margin-left: 0em;
60dt {
61  margin-top: .5em;
63h1 {
64  font-size: 14pt;
65  line-height: 21pt;
66  page-break-after: avoid;
67} {
69  page-break-before: always;
71h1 a {
72  color: #333333;
74h2 {
75  font-size: 12pt;
76  line-height: 15pt;
77  page-break-after: avoid;
79h3, h4, h5, h6 {
80  font-size: 10pt;
81  page-break-after: avoid;
83h2 a, h3 a, h4 a, h5 a, h6 a {
84  color: black;
86img {
87  margin-left: 3em;
89li {
90  margin-left: 2em;
91  margin-right: 2em;
93ol {
94  margin-left: 2em;
95  margin-right: 2em;
96} {
98  list-style-type: lower-alpha;
99} {
101  list-style-type: upper-alpha;
103ol p {
104  margin-left: 0em;
106p {
107  margin-left: 2em;
108  margin-right: 2em;
110pre {
111  margin-left: 3em;
112  background-color: lightyellow;
113  padding: .25em;
115pre.text2 {
116  border-style: dotted;
117  border-width: 1px;
118  background-color: #f0f0f0;
119  width: 69em;
121pre.inline {
122  background-color: white;
123  padding: 0em;
125pre.text {
126  border-style: dotted;
127  border-width: 1px;
128  background-color: #f8f8f8;
129  width: 69em;
131pre.drawing {
132  border-style: solid;
133  border-width: 1px;
134  background-color: #f8f8f8;
135  padding: 2em;
137table {
138  margin-left: 2em;
139} {
141  vertical-align: top;
143table.full {
144  border-style: outset;
145  border-width: 1px;
147table.headers {
148  border-style: outset;
149  border-width: 1px;
150} td {
152  vertical-align: top;
154table.full td {
155  border-style: inset;
156  border-width: 1px;
157} th {
159  vertical-align: top;
161table.full th {
162  border-style: inset;
163  border-width: 1px;
165table.headers th {
166  border-style: none none inset none;
167  border-width: 1px;
169table.left {
170  margin-right: auto;
172table.right {
173  margin-left: auto;
174} {
176  margin-left: auto;
177  margin-right: auto;
179caption {
180  caption-side: bottom;
181  font-weight: bold;
182  font-size: 9pt;
183  margin-top: .5em;
186table.header {
187  border-spacing: 1px;
188  width: 95%;
189  font-size: 10pt;
190  color: white;
191} {
193  vertical-align: top;
195td.topnowrap {
196  vertical-align: top;
197  white-space: nowrap;
199table.header td {
200  background-color: gray;
201  width: 50%;
203table.header a {
204  color: white;
206td.reference {
207  vertical-align: top;
208  white-space: nowrap;
209  padding-right: 1em;
211thead {
212  display:table-header-group;
214ul.toc, ul.toc ul {
215  list-style: none;
216  margin-left: 1.5em;
217  margin-right: 0em;
218  padding-left: 0em;
220ul.toc li {
221  line-height: 150%;
222  font-weight: bold;
223  font-size: 10pt;
224  margin-left: 0em;
225  margin-right: 0em;
227ul.toc li li {
228  line-height: normal;
229  font-weight: normal;
230  font-size: 9pt;
231  margin-left: 0em;
232  margin-right: 0em;
234li.excluded {
235  font-size: 0pt;
237ul p {
238  margin-left: 0em;
240ul.ind, ul.ind ul {
241  list-style: none;
242  margin-left: 1.5em;
243  margin-right: 0em;
244  padding-left: 0em;
245  page-break-before: avoid;
247ul.ind li {
248  font-weight: bold;
249  line-height: 200%;
250  margin-left: 0em;
251  margin-right: 0em;
253ul.ind li li {
254  font-weight: normal;
255  line-height: 150%;
256  margin-left: 0em;
257  margin-right: 0em;
259.avoidbreak {
260  page-break-inside: avoid;
262.bcp14 {
263  font-style: normal;
264  text-transform: lowercase;
265  font-variant: small-caps;
267blockquote > * .bcp14 {
268  font-style: italic;
270.comment {
271  background-color: yellow;
272} {
274  text-align: center;
276.error {
277  color: red;
278  font-style: italic;
279  font-weight: bold;
281.figure {
282  font-weight: bold;
283  text-align: center;
284  font-size: 9pt;
286.filename {
287  color: #333333;
288  font-weight: bold;
289  font-size: 12pt;
290  line-height: 21pt;
291  text-align: center;
293.fn {
294  font-weight: bold;
296.hidden {
297  display: none;
299.left {
300  text-align: left;
302.right {
303  text-align: right;
305.title {
306  color: #990000;
307  font-size: 18pt;
308  line-height: 18pt;
309  font-weight: bold;
310  text-align: center;
311  margin-top: 36pt;
313.vcardline {
314  display: block;
316.warning {
317  font-size: 14pt;
318  background-color: yellow;
322@media print {
323  .noprint {
324    display: none;
325  }
327  a {
328    color: black;
329    text-decoration: none;
330  }
332  table.header {
333    width: 90%;
334  }
336  td.header {
337    width: 50%;
338    color: black;
339    background-color: white;
340    vertical-align: top;
341    font-size: 12pt;
342  }
344  ul.toc a::after {
345    content: leader('.') target-counter(attr(href), page);
346  }
348  ul.ind li li a {
349    content: target-counter(attr(href), page);
350  }
352  .print2col {
353    column-count: 2;
354    -moz-column-count: 2;
355    column-fill: auto;
356  }
359@page {
360  @top-left {
361       content: "Internet-Draft";
362  }
363  @top-right {
364       content: "March 2011";
365  }
366  @top-center {
367       content: "Content-Disposition in HTTP";
368  }
369  @bottom-left {
370       content: "Reschke";
371  }
372  @bottom-center {
373       content: "Expires September 15, 2011";
374  }
375  @bottom-right {
376       content: "[Page " counter(page) "]";
377  }
380@page:first {
381    @top-left {
382      content: normal;
383    }
384    @top-right {
385      content: normal;
386    }
387    @top-center {
388      content: normal;
389    }
391</style><link rel="Contents" href="#rfc.toc">
392      <link rel="Author" href="#rfc.authors">
393      <link rel="Copyright" href="#rfc.copyrightnotice">
394      <link rel="Index" href="#rfc.index">
395      <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
396      <link rel="Chapter" title="2 Notational Conventions" href="#rfc.section.2">
397      <link rel="Chapter" title="3 Conformance and Error Handling" href="#rfc.section.3">
398      <link rel="Chapter" title="4 Header Field Definition" href="#rfc.section.4">
399      <link rel="Chapter" title="5 Examples" href="#rfc.section.5">
400      <link rel="Chapter" title="6 Internationalization Considerations" href="#rfc.section.6">
401      <link rel="Chapter" title="7 Security Considerations" href="#rfc.section.7">
402      <link rel="Chapter" title="8 IANA Considerations" href="#rfc.section.8">
403      <link rel="Chapter" title="9 Acknowledgements" href="#rfc.section.9">
404      <link rel="Chapter" href="#rfc.section.10" title="10 References">
405      <link rel="Appendix" title="A Changes from the RFC 2616 Definition" href="#rfc.section.A">
406      <link rel="Appendix" title="B Differences compared to RFC 2183" href="#rfc.section.B">
407      <link rel="Appendix" title="C Alternative Approaches to Internationalization" href="#rfc.section.C">
408      <link rel="Appendix" title="D Advice on Generating Content-Disposition Header Fields" href="#rfc.section.D">
409      <link rel="Appendix" title="E Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.E">
410      <meta name="generator" content=", Revision 1.543, 2011-02-18 21:03:40, XSLT vendor: SAXON 8.9 from Saxonica">
411      <link rel="schema.dct" href="">
412      <meta name="dct.creator" content="Reschke, J. F.">
413      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-content-disp-latest">
414      <meta name="dct.issued" scheme="ISO8601" content="2011-03-14">
415      <meta name="dct.abstract" content="RFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard. This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization aspects.">
416      <meta name="description" content="RFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard. This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization aspects.">
417   </head>
418   <body>
419      <table class="header">
420         <tbody>
421            <tr>
422               <td class="left">HTTPbis Working Group</td>
423               <td class="right">J. Reschke</td>
424            </tr>
425            <tr>
426               <td class="left">Internet-Draft</td>
427               <td class="right">greenbytes</td>
428            </tr>
429            <tr>
430               <td class="left">Updates: <a href="">2616</a> (if approved)
431               </td>
432               <td class="right">March 14, 2011</td>
433            </tr>
434            <tr>
435               <td class="left">Intended status: Standards Track</td>
436               <td class="right"></td>
437            </tr>
438            <tr>
439               <td class="left">Expires: September 15, 2011</td>
440               <td class="right"></td>
441            </tr>
442         </tbody>
443      </table>
444      <p class="title">Use of the Content-Disposition&nbsp;Header&nbsp;Field in the Hypertext&nbsp;Transfer&nbsp;Protocol&nbsp;(HTTP)<br><span class="filename">draft-ietf-httpbis-content-disp-latest</span></p>
445      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
446      <p>RFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard.
447         This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization
448         aspects.
449      </p>
450      <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor before publication)</a></h1>
451      <p>This specification is expected to replace the definition of Content-Disposition in the HTTP/1.1 specification, as currently
452         revised by the IETF HTTPbis working group. See also &lt;<a href=""></a>&gt;.
453      </p> 
454      <p>Discussion of this draft should take place on the HTTPBIS working group mailing list ( The current issues
455         list is at &lt;<a href=""></a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href=""></a>&gt;.
456      </p> 
457      <p>The changes in this draft are summarized in <a href="#changes.since.08" title="Since draft-ietf-httpbis-content-disp-08">Appendix&nbsp;E.13</a>.
458      </p>
459      <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
460      <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
461      <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
462         working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href=""></a>.
463      </p>
464      <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
465         documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
466         in progress”.
467      </p>
468      <p>This Internet-Draft will expire on September 15, 2011.</p>
469      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
470      <p>Copyright © 2011 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
471      <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href=""></a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
472         and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
473         text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
474         BSD License.
475      </p>
476      <hr class="noprint">
477      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
478      <ul class="toc">
479         <li>1.&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li>
480         <li>2.&nbsp;&nbsp;&nbsp;<a href="#notational.conventions">Notational Conventions</a></li>
481         <li>3.&nbsp;&nbsp;&nbsp;<a href="#conformance.and.error.handling">Conformance and Error Handling</a></li>
482         <li>4.&nbsp;&nbsp;&nbsp;<a href="#header.field.definition">Header Field Definition</a><ul>
483               <li>4.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Grammar</a></li>
484               <li>4.2&nbsp;&nbsp;&nbsp;<a href="#disposition.type">Disposition Type</a></li>
485               <li>4.3&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.filename">Disposition Parameter: 'Filename'</a></li>
486               <li>4.4&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.extensions">Disposition Parameter: Extensions</a></li>
487               <li>4.5&nbsp;&nbsp;&nbsp;<a href="#extensibility">Extensibility</a></li>
488            </ul>
489         </li>
490         <li>5.&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a></li>
491         <li>6.&nbsp;&nbsp;&nbsp;<a href="#i18n">Internationalization Considerations</a></li>
492         <li>7.&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li>
493         <li>8.&nbsp;&nbsp;&nbsp;<a href="#iana.considerations">IANA Considerations</a><ul>
494               <li>8.1&nbsp;&nbsp;&nbsp;<a href="#registry">Registry for Disposition Values and Parameter</a></li>
495               <li>8.2&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
496            </ul>
497         </li>
498         <li>9.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
499         <li>10.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
500               <li>10.1&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
501               <li>10.2&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
502            </ul>
503         </li>
504         <li><a href="#rfc.authors">Author's Address</a></li>
505         <li>A.&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc2616">Changes from the RFC 2616 Definition</a></li>
506         <li>B.&nbsp;&nbsp;&nbsp;<a href="">Differences compared to RFC 2183</a></li>
507         <li>C.&nbsp;&nbsp;&nbsp;<a href="#alternatives">Alternative Approaches to Internationalization</a><ul>
508               <li>C.1&nbsp;&nbsp;&nbsp;<a href="#alternatives.rfc2047">RFC 2047 Encoding</a></li>
509               <li>C.2&nbsp;&nbsp;&nbsp;<a href="#alternatives.percent">Percent Encoding</a></li>
510               <li>C.3&nbsp;&nbsp;&nbsp;<a href="#alternatives.sniff">Encoding Sniffing</a></li>
511               <li>C.4&nbsp;&nbsp;&nbsp;<a href="#alternatives.implementations">Implementations (to be removed by RFC Editor before publication)</a></li>
512            </ul>
513         </li>
514         <li>D.&nbsp;&nbsp;&nbsp;<a href="#advice.generating">Advice on Generating Content-Disposition Header Fields</a></li>
515         <li>E.&nbsp;&nbsp;&nbsp;<a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a><ul>
516               <li>E.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.1">Since draft-reschke-rfc2183-in-http-00</a></li>
517               <li>E.2&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.2">Since draft-reschke-rfc2183-in-http-01</a></li>
518               <li>E.3&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.3">Since draft-reschke-rfc2183-in-http-02</a></li>
519               <li>E.4&nbsp;&nbsp;&nbsp;<a href="#rfc.section.E.4">Since draft-reschke-rfc2183-in-http-03</a></li>
520               <li>E.5&nbsp;&nbsp;&nbsp;<a href="#changes.since.00">Since draft-ietf-httpbis-content-disp-00</a></li>
521               <li>E.6&nbsp;&nbsp;&nbsp;<a href="#changes.since.01">Since draft-ietf-httpbis-content-disp-01</a></li>
522               <li>E.7&nbsp;&nbsp;&nbsp;<a href="#changes.since.02">Since draft-ietf-httpbis-content-disp-02</a></li>
523               <li>E.8&nbsp;&nbsp;&nbsp;<a href="#changes.since.03">Since draft-ietf-httpbis-content-disp-03</a></li>
524               <li>E.9&nbsp;&nbsp;&nbsp;<a href="#changes.since.04">Since draft-ietf-httpbis-content-disp-04</a></li>
525               <li>E.10&nbsp;&nbsp;&nbsp;<a href="#changes.since.05">Since draft-ietf-httpbis-content-disp-05</a></li>
526               <li>E.11&nbsp;&nbsp;&nbsp;<a href="#changes.since.06">Since draft-ietf-httpbis-content-disp-06</a></li>
527               <li>E.12&nbsp;&nbsp;&nbsp;<a href="#changes.since.07">Since draft-ietf-httpbis-content-disp-07</a></li>
528               <li>E.13&nbsp;&nbsp;&nbsp;<a href="#changes.since.08">Since draft-ietf-httpbis-content-disp-08</a></li>
529            </ul>
530         </li>
531         <li><a href="#rfc.index">Index</a></li>
532      </ul>
533      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
534      <p id="rfc.section.1.p.1">RFC 2616 defines the Content-Disposition response header field in <a href="">Section 19.5.1</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, but points out that it is not part of the HTTP/1.1 Standard (<a href="" id="rfc.xref.RFC2616.2">Section 15.5</a>):
535      </p>
536      <blockquote id="rfc.section.1.p.2" cite="">
537         <p>Content-Disposition is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks
538            for implementers.
539         </p>
540      </blockquote>
541      <p id="rfc.section.1.p.3">This specification takes over the definition and registration of Content-Disposition, as used in HTTP. Based on interoperability
542         testing with existing User Agents, it fully defines a profile of the features defined in the Multipurpose Internet Mail Extensions
543         (MIME) variant (<a href="#RFC2183" id="rfc.xref.RFC2183.1"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a>) of the header field, and also clarifies internationalization aspects.
544      </p>
545      <div class="note" id="rfc.section.1.p.4">
546         <p> <b>Note:</b> this document does not apply to Content-Disposition header fields appearing in payload bodies transmitted over HTTP, such
547            as when using the media type "multipart/form-data" (<a href="#RFC2388" id="rfc.xref.RFC2388.1"><cite title="Returning Values from Forms: multipart/form-data">[RFC2388]</cite></a>).
548         </p>
549      </div>
550      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="notational.conventions" href="#notational.conventions">Notational Conventions</a></h1>
551      <p id="rfc.section.2.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
552         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>.
553      </p>
554      <p id="rfc.section.2.p.2">This specification uses the augmented BNF notation defined in <a href="">Section 2.1</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, including its rules for implied linear whitespace (LWS).
555      </p>
556      <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="conformance.and.error.handling" href="#conformance.and.error.handling">Conformance and Error Handling</a></h1>
557      <p id="rfc.section.3.p.1">This specification defines conformance criteria for both senders (usually, HTTP origin servers) and recipients (usually, HTTP
558         user agents) of the Content-Disposition header field. An implementation is considered conformant if it complies with all of
559         the requirements associated with its role.
560      </p>
561      <p id="rfc.section.3.p.2">This specification also defines certain forms of the header field-value to be invalid, using both ABNF and prose requirements
562         (<a href="#header.field.definition" id="rfc.xref.header.field.definition.1" title="Header Field Definition">Section&nbsp;4</a>), but it does not define special handling of these invalid field-values.
563      </p>
564      <p id="rfc.section.3.p.3">Senders <em class="bcp14">MUST NOT</em> generate Content-Disposition header fields that are invalid.
565      </p>
566      <p id="rfc.section.3.p.4">Recipients <em class="bcp14">MAY</em> take steps to recover a usable field-value from an invalid header field, but <em class="bcp14">SHOULD NOT</em> reject the message outright, unless this is explicitly desirable behaviour (e.g., the implementation is a validator). As such,
567         the default handling of invalid fields is to ignore them.
568      </p>
569      <div id="rfc.iref.h.1"></div>
570      <div id="rfc.iref.c.1"></div>
571      <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a id="header.field.definition" href="#header.field.definition">Header Field Definition</a></h1>
572      <p id="rfc.section.4.p.1">The Content-Disposition response header field is used to convey additional information about how to process the response payload,
573         and also can be used to attach additional metadata, such as the filename to use when saving the response payload locally.
574      </p>
575      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Grammar
576      </h2>
577      <div id="rfc.figure.u.1"></div><pre class="inline">  content-disposition = "Content-Disposition" ":"
578                         disposition-type *( ";" disposition-parm )
580  disposition-type    = "inline" | "attachment" | disp-ext-type
581                      ; case-insensitive
582  disp-ext-type       = token
584  disposition-parm    = filename-parm | disp-ext-parm
586  filename-parm       = "filename" "=" value
587                      | "filename*" "=" ext-value
589  disp-ext-parm       = token "=" value
590                      | ext-token "=" ext-value
591  ext-token           = &lt;the characters in token, followed by "*"&gt;
592</pre><div id="rfc.figure.u.2"></div>
593      <p>Defined in <a href="#RFC2616" id="rfc.xref.RFC2616.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>:
594      </p>  <pre class="inline">  token         = &lt;token, defined in <a href="#RFC2616" id="rfc.xref.RFC2616.5"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="">Section 2.2</a>&gt;
595  quoted-string = &lt;quoted-string, defined in <a href="#RFC2616" id="rfc.xref.RFC2616.6"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="">Section 2.2</a>&gt;
596  value         = &lt;value, defined in <a href="#RFC2616" id="rfc.xref.RFC2616.7"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="">Section 3.6</a>&gt;
597                ; token | quoted-string
599</pre><div id="rfc.figure.u.3"></div>
600      <p>Defined in <a href="#RFC5987" id="rfc.xref.RFC5987.1"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>:
601      </p>  <pre class="inline">  ext-value   = &lt;ext-value, defined in <a href="#RFC5987" id="rfc.xref.RFC5987.2"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>, <a href="">Section 3.2</a>&gt;
602</pre><p id="rfc.section.4.1.p.4">Header field values with multiple instances of the same parameter name are invalid.</p>
603      <p id="rfc.section.4.1.p.5">Note that due to the rules for implied linear whitespace (<a href="">Section 2.1</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.8"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>), <em class="bcp14">OPTIONAL</em> whitespace can appear between words (token or quoted-string) and separator characters.
604      </p>
605      <p id="rfc.section.4.1.p.6">Furthermore note that the format used for ext-value allows specifying a natural language; this is of limited use for filenames
606         and is likely to be ignored by recipients.
607      </p>
608      <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a id="disposition.type" href="#disposition.type">Disposition Type</a></h2>
609      <p id="rfc.section.4.2.p.1">If the disposition type matches "attachment" (case-insensitively), this indicates that the recipient should prompt the user
610         to save the response locally, rather than process it normally (as per its media type).
611      </p>
612      <p id="rfc.section.4.2.p.2">On the other hand, if it matches "inline" (case-insensitively), this implies default processing. Therefore, the disposition
613         type "inline" is only useful when it is augmented with additional parameters, such as the filename (see below).
614      </p>
615      <p id="rfc.section.4.2.p.3">Unknown or unhandled disposition types <em class="bcp14">SHOULD</em> be handled by recipients the same way as "attachment" (see also <a href="#RFC2183" id="rfc.xref.RFC2183.2"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a>, <a href="">Section 2.8</a>).
616      </p>
617      <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;<a id="disposition.parameter.filename" href="#disposition.parameter.filename">Disposition Parameter: 'Filename'</a></h2>
618      <p id="rfc.section.4.3.p.1">The parameters "filename" and "filename*", to be matched case-insensitively, provide information on how to construct a filename
619         for storing the message payload.
620      </p>
621      <p id="rfc.section.4.3.p.2">Depending on the disposition type, this information might be used right away (in the "save as..." interaction caused for the
622         "attachment" disposition type), or later on (for instance, when the user decides to save the contents of the current page
623         being displayed).
624      </p>
625      <p id="rfc.section.4.3.p.3">The parameters "filename" and "filename*" differ only in that "filename*" uses the encoding defined in <a href="#RFC5987" id="rfc.xref.RFC5987.3"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>, allowing the use of characters not present in the ISO-8859-1 character set (<a href="#ISO-8859-1" id="rfc.xref.ISO-8859-1.1"><cite title="Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1">[ISO-8859-1]</cite></a>).
626      </p>
627      <p id="rfc.section.4.3.p.4">Many user agent implementations predating this specification do not understand the "filename*" parameter. Therefore, when
628         both "filename" and "filename*" are present in a single header field value, recipients <em class="bcp14">SHOULD</em> pick "filename*" and ignore "filename". This way, senders can avoid special-casing specific user agents by sending both the
629         more expressive "filename*" parameter, and the "filename" parameter as fallback for legacy recipients (see <a href="#examples" title="Examples">Section&nbsp;5</a> for an example).
630      </p>
631      <p id="rfc.section.4.3.p.5">It is essential that recipients treat the specified filename as advisory only, thus be very careful in extracting the desired
632         information. In particular:
633      </p>
634      <ul>
635         <li>
636            <p>Recipients <em class="bcp14">MUST NOT</em> be able to write into any location other than one to which they are specifically entitled. To illustrate the problem consider
637               the consequences of being able to overwrite well-known system locations (such as "/etc/passwd"). One strategy to achieve this
638               is to never trust folder name information in the filename parameter, for instance by stripping all but the last path segment
639               and only consider the actual filename (where 'path segment' are the components of the field value delimited by the path separator
640               characters "\" and "/").
641            </p>
642         </li>
643         <li>
644            <p>Many platforms do not use 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>) to hold type information in the file system, but rely on filename extensions instead. Trusting the server-provided file
645               extension could introduce a privilege escalation when the saved file is later opened (consider ".exe"). Thus, recipients <em class="bcp14">SHOULD</em> ensure that a file extension is used that is safe, optimally matching the media type of the received payload.
646            </p>
647         </li>
648         <li>
649            <p>Recipients <em class="bcp14">SHOULD</em> strip or replace character sequences that are known to cause confusion both in user interfaces and in filenames, such as control
650               characters and leading and trailing whitespace.
651            </p>
652         </li>
653         <li>
654            <p>Other aspects recipients need to be aware of are names that have a special meaning in the file system or in shell commands,
655               such as "." and "..", "~", "|", and also device names. Recipients <em class="bcp14">SHOULD</em> ignore or substitute names like these.
656            </p>
657         </li>
658      </ul>
659      <div class="note" id="rfc.section.4.3.p.6">
660         <p> <b>Note:</b> Many user agents do not properly handle the escape character "\" when using the quoted-string form. Furthermore, some user
661            agents erroneously try to perform unescaping of "percent" escapes (see <a href="#alternatives.percent" title="Percent Encoding">Appendix&nbsp;C.2</a>), and thus might misinterpret filenames containing the percent character followed by two hex digits.
662         </p>
663      </div>
664      <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;<a id="disposition.parameter.extensions" href="#disposition.parameter.extensions">Disposition Parameter: Extensions</a></h2>
665      <p id="rfc.section.4.4.p.1">To enable future extensions, recipients <em class="bcp14">SHOULD</em> ignore unrecognized parameters (see also <a href="#RFC2183" id="rfc.xref.RFC2183.3"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a>, <a href="">Section 2.8</a>).
666      </p>
667      <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;<a id="extensibility" href="#extensibility">Extensibility</a></h2>
668      <p id="rfc.section.4.5.p.1">Note that <a href="">Section 9</a> of <a href="#RFC2183" id="rfc.xref.RFC2183.4"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a> defines IANA registries both for disposition types and disposition parameters. This registry is shared by different protocols
669         using Content-Disposition, such as MIME and HTTP. Therefore, not all registered values may make sense in the context of HTTP.
670      </p>
671      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="examples" href="#examples">Examples</a></h1>
672      <div id="rfc.figure.u.4"></div>
673      <p>Direct UA to show "save as" dialog, with a filename of "example.html":</p>  <pre class="text">Content-Disposition: Attachment; filename=example.html
674</pre><div id="rfc.figure.u.5"></div>
675      <p>Direct UA to behave as if the Content-Disposition header field wasn't present, but to remember the filename "an example.html"
676         for a subsequent save operation:
677      </p>  <pre class="text">Content-Disposition: INLINE; FILENAME= "an example.html"
678</pre>  <p>Note: this uses the quoted-string form so that the space character can be included.</p>
679      <div id="rfc.figure.u.6"></div>
680      <p>Direct UA to show "save as" dialog, with a filename containing the Unicode character U+20AC (EURO SIGN):</p>  <pre class="text">Content-Disposition: attachment;
681                     filename*= UTF-8''<b>%e2%82%ac</b>%20rates
682</pre>  <p>Here, the encoding defined in <a href="#RFC5987" id="rfc.xref.RFC5987.4"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a> is also used to encode the non-ISO-8859-1 character.
683      </p>
684      <div id="rfc.figure.u.7"></div>
685      <p>Same as above, but adding the "filename" parameter for compatibility with user agents not implementing RFC 5987:</p>  <pre class="text">Content-Disposition: attachment;
686                     filename="EURO rates";
687                     filename*=utf-8''<b>%e2%82%ac</b>%20rates
688</pre>  <p>Note: those user agents that do not support the RFC 5987 encoding ignore "filename*" when it occurs after "filename".</p>
689      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="i18n" href="#i18n">Internationalization Considerations</a></h1>
690      <p id="rfc.section.6.p.1">The "filename*" parameter (<a href="#disposition.parameter.filename" title="Disposition Parameter: 'Filename'">Section&nbsp;4.3</a>), using the encoding defined in <a href="#RFC5987" id="rfc.xref.RFC5987.5"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>, allows the server to transmit characters outside the ISO-8859-1 character set, and also to optionally specify the language
691         in use.
692      </p>
693      <p id="rfc.section.6.p.2">Future parameters might also require internationalization, in which case the same encoding can be used.</p>
694      <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
695      <p id="rfc.section.7.p.1">Using server-supplied information for constructing local filenames introduces many risks. These are summarized in <a href="#disposition.parameter.filename" title="Disposition Parameter: 'Filename'">Section&nbsp;4.3</a>.
696      </p>
697      <p id="rfc.section.7.p.2">Furthermore, implementers also ought to be aware of the Security Considerations applying to HTTP (see <a href="">Section 15</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.9"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>), and also the parameter encoding defined in <a href="#RFC5987" id="rfc.xref.RFC5987.6"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a> (see <a href="" id="rfc.xref.RFC5987.7">Section 5</a>).
698      </p>
699      <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a id="iana.considerations" href="#iana.considerations">IANA Considerations</a></h1>
700      <h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a id="registry" href="#registry">Registry for Disposition Values and Parameter</a></h2>
701      <p id="rfc.section.8.1.p.1">This specification does not introduce any changes to the registration procedures for disposition values and parameters that
702         are defined in <a href="">Section 9</a> of <a href="#RFC2183" id="rfc.xref.RFC2183.5"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a>.
703      </p>
704      <h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;<a id="header.field.registration" href="#header.field.registration">Header Field Registration</a></h2>
705      <p id="rfc.section.8.2.p.1">This document updates the definition of the Content-Disposition HTTP header field in the permanent HTTP header field registry
706         (see <a href="#RFC3864" id="rfc.xref.RFC3864.1"><cite title="Registration Procedures for Message Header Fields">[RFC3864]</cite></a>).
707      </p>
708      <p id="rfc.section.8.2.p.2"> </p>
709      <dl>
710         <dt>Header field name:</dt>
711         <dd>Content-Disposition</dd>
712         <dt>Applicable protocol:</dt>
713         <dd>http</dd>
714         <dt>Status:</dt>
715         <dd>standard</dd>
716         <dt>Author/Change controller:</dt>
717         <dd>IETF</dd>
718         <dt>Specification document:</dt>
719         <dd>this specification (<a href="#header.field.definition" id="rfc.xref.header.field.definition.2" title="Header Field Definition">Section&nbsp;4</a>)
720         </dd>
721      </dl>
722      <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
723      </h1>
724      <p id="rfc.section.9.p.1">Thanks to Adam Barth, Rolf Eike Beer, Stewart Bryant, Bjoern Hoehrmann, Alfred Hoenes, Roar Lauritzsen, Alexey Melnikov, Henrik
725         Nordstrom, and Mark Nottingham for their valuable feedback.
726      </p>
727      <h1 id="rfc.references"><a id="rfc.section.10" href="#rfc.section.10">10.</a> References
728      </h1>
729      <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References
730      </h2>
731      <table>       
732         <tr>
733            <td class="reference"><b id="ISO-8859-1">[ISO-8859-1]</b></td>
734            <td class="top">International Organization for Standardization, “Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1”, ISO/IEC&nbsp;8859-1:1998, 1998.</td>
735         </tr>
736         <tr>
737            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
738            <td class="top"><a href="" title="Harvard University">Bradner, S.</a>, “<a href="">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
739            </td>
740         </tr>
741         <tr>
742            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
743            <td class="top"><a href="" title="University of California, Irvine">Fielding, R.</a>, <a href="" title="W3C">Gettys, J.</a>, <a href="" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="" title="Xerox Corporation">Masinter, L.</a>, <a href="" title="Microsoft Corporation">Leach, P.</a>, and <a href="" title="W3C">T. Berners-Lee</a>, “<a href="">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
744            </td>
745         </tr>
746         <tr>
747            <td class="reference"><b id="RFC5987">[RFC5987]</b></td>
748            <td class="top"><a href="" title="greenbytes GmbH">Reschke, J.</a>, “<a href="">Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters</a>”, RFC&nbsp;5987, August&nbsp;2010.
749            </td>
750         </tr>
751      </table>
752      <h2 id="rfc.references.2"><a href="#rfc.section.10.2" id="rfc.section.10.2">10.2</a> Informative References
753      </h2>
754      <table>               
755         <tr>
756            <td class="reference"><b id="RFC2046">[RFC2046]</b></td>
757            <td class="top"><a href="" title="Innosoft International, Inc.">Freed, N.</a> and <a href="" title="First Virtual Holdings">N. Borenstein</a>, “<a href="">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a>”, RFC&nbsp;2046, November&nbsp;1996.
758            </td>
759         </tr>
760         <tr>
761            <td class="reference"><b id="RFC2047">[RFC2047]</b></td>
762            <td class="top"><a href="" title="University of Tennessee">Moore, K.</a>, “<a href="">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</a>”, RFC&nbsp;2047, November&nbsp;1996.
763            </td>
764         </tr>
765         <tr>
766            <td class="reference"><b id="RFC2183">[RFC2183]</b></td>
767            <td class="top"><a href="" title="New Century Systems">Troost, R.</a>, <a href="" title="QUALCOMM Incorporated">Dorner, S.</a>, and <a href="" title="Department of Computer Science">K. Moore</a>, “<a href="">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</a>”, RFC&nbsp;2183, August&nbsp;1997.
768            </td>
769         </tr>
770         <tr>
771            <td class="reference"><b id="RFC2231">[RFC2231]</b></td>
772            <td class="top"><a href="" title="Innosoft International, Inc.">Freed, N.</a> and <a href="" title="University of Tennessee">K. Moore</a>, “<a href="">MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations</a>”, RFC&nbsp;2231, November&nbsp;1997.
773            </td>
774         </tr>
775         <tr>
776            <td class="reference"><b id="RFC2388">[RFC2388]</b></td>
777            <td class="top"><a href="" title="Xerox Palo Alto Research Center">Masinter, L.</a>, “<a href="">Returning Values from Forms: multipart/form-data</a>”, RFC&nbsp;2388, August&nbsp;1998.
778            </td>
779         </tr>
780         <tr>
781            <td class="reference"><b id="RFC3864">[RFC3864]</b></td>
782            <td class="top"><a href="" title="Nine by Nine">Klyne, G.</a>, <a href="" title="BEA Systems">Nottingham, M.</a>, and <a href="" title="HP Labs">J. Mogul</a>, “<a href="">Registration Procedures for Message Header Fields</a>”, BCP&nbsp;90, RFC&nbsp;3864, September&nbsp;2004.
783            </td>
784         </tr>
785         <tr>
786            <td class="reference"><b id="RFC3986">[RFC3986]</b></td>
787            <td class="top"><a href="" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="" title="Day Software">Fielding, R.</a>, and <a href="" title="Adobe Systems Incorporated">L. Masinter</a>, “<a href="">Uniform Resource Identifier (URI): Generic Syntax</a>”, STD&nbsp;66, RFC&nbsp;3986, January&nbsp;2005.
788            </td>
789         </tr>
790      </table>
791      <div class="avoidbreak">
792         <h1 id="rfc.authors"><a href="#rfc.authors">Author's Address</a></h1>
793         <address class="vcard"><span class="vcardline"><span class="fn">Julian F. Reschke</span><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">Email: <a href=""><span class="email"></span></a></span><span class="vcardline">URI: <a href="" class="url"></a></span></address>
794      </div>
795      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="changes.from.rfc2616" href="#changes.from.rfc2616">Changes from the RFC 2616 Definition</a></h1>
796      <p id="rfc.section.A.p.1">Compared to <a href="">Section 19.5.1</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.10"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, the following normative changes reflecting actual implementations have been made:
797      </p>
798      <ul>
799         <li>According to RFC 2616, the disposition type "attachment" only applies to content of type "application/octet-stream". This
800            restriction has been removed, because recipients in practice do not check the content type, and it also discourages properly
801            declaring the media type.
802         </li>
803         <li>RFC 2616 only allows "quoted-string" for the filename parameter. This would be an exceptional parameter syntax, and also doesn't
804            reflect actual use.
805         </li>
806         <li>The definition for the disposition type "inline" (<a href="#RFC2183" id="rfc.xref.RFC2183.6"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a>, <a href="">Section 2.1</a>) has been re-added with a suggestion for its processing.
807         </li>
808         <li>This specification requires support for the extended parameter encoding defined in <a href="#RFC5987" id="rfc.xref.RFC5987.8"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>.
809         </li>
810      </ul>
811      <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="" href="">Differences compared to RFC 2183</a></h1>
812      <p id="rfc.section.B.p.1"> <a href="">Section 2</a> of <a href="#RFC2183" id="rfc.xref.RFC2183.7"><cite title="Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field">[RFC2183]</cite></a> defines several additional disposition parameters: "creation-date", "modification-date", "quoted-date-time", and "size". The
813         majority of user agents does not implement these, thus they have been omitted from this specification.
814      </p>
815      <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="alternatives" href="#alternatives">Alternative Approaches to Internationalization</a></h1>
816      <p id="rfc.section.C.p.1">By default, HTTP header field parameters cannot carry characters outside the ISO-8859-1 (<a href="#ISO-8859-1" id="rfc.xref.ISO-8859-1.2"><cite title="Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1">[ISO-8859-1]</cite></a>) character encoding (see <a href="#RFC2616" id="rfc.xref.RFC2616.11"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="">Section 2.2</a>). For the "filename" parameter, this of course is an unacceptable restriction.
817      </p>
818      <p id="rfc.section.C.p.2">Unfortunately, user agent implementers have not managed to come up with an interoperable approach, although the IETF Standards
819         Track specifies exactly one solution (<a href="#RFC2231" id="rfc.xref.RFC2231.1"><cite title="MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations">[RFC2231]</cite></a>, clarified and profiled for HTTP in <a href="#RFC5987" id="rfc.xref.RFC5987.9"><cite title="Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters">[RFC5987]</cite></a>).
820      </p>
821      <p id="rfc.section.C.p.3">For completeness, the sections below describe the various approaches that have been tried, and explains how they are inferior
822         to the RFC 5987 encoding used in this specification.
823      </p>
824      <h2 id="rfc.section.C.1"><a href="#rfc.section.C.1">C.1</a>&nbsp;<a id="alternatives.rfc2047" href="#alternatives.rfc2047">RFC 2047 Encoding</a></h2>
825      <p id="rfc.section.C.1.p.1">RFC 2047 defines an encoding mechanism for header fields, but this encoding is not supposed to be used for header field parameters
826         - see <a href="">Section 5</a> of <a href="#RFC2047" id="rfc.xref.RFC2047.1"><cite title="MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text">[RFC2047]</cite></a>:
827      </p>
828      <blockquote id="rfc.section.C.1.p.2" cite="">
829         <p>An 'encoded-word' MUST NOT appear within a 'quoted-string'.</p> 
830         <p>...</p> 
831         <p>An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured
832            field body except within a 'comment' or 'phrase'.
833         </p>
834      </blockquote>
835      <p id="rfc.section.C.1.p.3">In practice, some user agents implement the encoding, some do not (exposing the encoded string to the user), and some get
836         confused by it.
837      </p>
838      <h2 id="rfc.section.C.2"><a href="#rfc.section.C.2">C.2</a>&nbsp;<a id="alternatives.percent" href="#alternatives.percent">Percent Encoding</a></h2>
839      <p id="rfc.section.C.2.p.1">Some user agents accept percent encoded (<a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="">Section 2.1</a>) sequences of characters. The character encoding being used for decoding depends on various factors, including the encoding
840         of the referring page, the user agent's locale, its configuration, and also the actual value of the parameter.
841      </p>
842      <p id="rfc.section.C.2.p.2">In practice, this is hard to use because those user agents that do not support it will display the escaped character sequence
843         to the user. For those user agents that do implement this it is difficult to predict what character encoding they actually
844         expect.
845      </p>
846      <h2 id="rfc.section.C.3"><a href="#rfc.section.C.3">C.3</a>&nbsp;<a id="alternatives.sniff" href="#alternatives.sniff">Encoding Sniffing</a></h2>
847      <p id="rfc.section.C.3.p.1">Some user agents inspect the value (which defaults to ISO-8859-1 for the quoted-string form) and switch to UTF-8 when it seems
848         to be more likely to be the correct interpretation.
849      </p>
850      <p id="rfc.section.C.3.p.2">As with the approaches above, this is not interoperable and furthermore risks misinterpreting the actual value.</p>
851      <h2 id="rfc.section.C.4"><a href="#rfc.section.C.4">C.4</a>&nbsp;<a id="alternatives.implementations" href="#alternatives.implementations">Implementations (to be removed by RFC Editor before publication)</a></h2>
852      <p id="rfc.section.C.4.p.1">Unfortunately, as of March 2011, neither the encoding defined in RFCs 2231 and 5987, nor any of the alternate approaches discussed
853         above was implemented interoperably. Thus, this specification recommends the approach defined in RFC 5987, which at least
854         has the advantage of actually being specified properly.
855      </p>
856      <p id="rfc.section.C.4.p.2">The table below shows the implementation support for the various approaches:</p>
857      <div id="rfc.table.u.1">
858         <table class="tt full left" cellpadding="3" cellspacing="0">
859            <thead>
860               <tr>
861                  <th>User Agent</th>
862                  <th>RFC 2231/5987</th>
863                  <th>RFC 2047</th>
864                  <th>Percent Encoding</th>
865                  <th>Encoding Sniffing</th>
866               </tr>
867            </thead>
868            <tbody>
869               <tr>
870                  <td class="left">Chrome</td>
871                  <td class="left">yes</td>
872                  <td class="left">yes</td>
873                  <td class="left">yes</td>
874                  <td class="left">yes</td>
875               </tr>
876               <tr>
877                  <td class="left">Firefox</td>
878                  <td class="left">yes (*)</td>
879                  <td class="left">yes</td>
880                  <td class="left">no</td>
881                  <td class="left">yes</td>
882               </tr>
883               <tr>
884                  <td class="left">Internet Explorer</td>
885                  <td class="left">yes (**)</td>
886                  <td class="left">no</td>
887                  <td class="left">yes</td>
888                  <td class="left">no</td>
889               </tr>
890               <tr>
891                  <td class="left">Konqueror</td>
892                  <td class="left">yes</td>
893                  <td class="left">no</td>
894                  <td class="left">no</td>
895                  <td class="left">no</td>
896               </tr>
897               <tr>
898                  <td class="left">Opera</td>
899                  <td class="left">yes</td>
900                  <td class="left">no</td>
901                  <td class="left">no</td>
902                  <td class="left">no</td>
903               </tr>
904               <tr>
905                  <td class="left">Safari</td>
906                  <td class="left">no</td>
907                  <td class="left">no</td>
908                  <td class="left">no</td>
909                  <td class="left">yes</td>
910               </tr>
911            </tbody>
912         </table>
913      </div>
914      <p id="rfc.section.C.4.p.3">(*) Does not implement the fallback behavior to "filename" described in <a href="#disposition.parameter.filename" title="Disposition Parameter: 'Filename'">Section&nbsp;4.3</a>; a fix is planned for Firefox 5.
915      </p>
916      <p id="rfc.section.C.4.p.4">(**) Starting with IE9RC, but only implements UTF-8.</p>
917      <h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a>&nbsp;<a id="advice.generating" href="#advice.generating">Advice on Generating Content-Disposition Header Fields</a></h1>
918      <p id="rfc.section.D.p.1">To successfully interoperate with existing and future user agents, senders of the Content-Disposition header field are advised
919         to:
920      </p>
921      <p id="rfc.section.D.p.2"> </p>
922      <ul>
923         <li>Include a "filename" parameter when US-ASCII is sufficiently expressive.</li>
924         <li>Use the 'token' form of the filename parameter only when it does not contain disallowed characters (e.g., spaces); in such
925            cases, the quoted-string form should be used.
926         </li>
927         <li>Avoid including the percent character followed by two hexadecimal characters (e.g., %A9) in the filename parameter, since
928            some existing implementations consider it to be an escape character, while others will pass it through unchanged.
929         </li>
930         <li>Avoid including the "\" character in the quoted-string form of the filename parameter, as escaping is not implemented by some
931            user agents, and can be considered as an illegal path character.
932         </li>
933         <li>Avoid using non-ASCII characters in the filename parameter. Although most existing implementations will decode them as ISO-8859-1,
934            some will apply heuristics to detect UTF-8, and thus might fail on certain names.
935         </li>
936         <li>Include a "filename*" parameter where the desired filename cannot be expressed faithfully using the "filename" form. Note
937            that legacy user agents will not process this, and will fall back to using the "filename" parameter's content.
938         </li>
939         <li>When a "filename*" parameter is sent, to also generate a "filename" parameter as a fallback for user agents that do not support
940            the "filename*" form, if possible. This can be done by substituting characters with US-ASCII sequences (e.g., Unicode character
941            point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by "ae"). Note that this may not be possible in some locales.
942         </li>
943         <li>When a "filename" parameter is included as a fallback (as per above), "filename" should occur first, due to parsing problems
944            in some existing implementations. <span class="comment" id="fallbackbug">[<a href="#fallbackbug" class="smpl">fallbackbug</a>: Firefox is known to pick the wrong parameter; a bug fix is scheduled for Firefox 5. --jre]</span>
945         </li>
946         <li>Use UTF-8 as the encoding of the "filename*" parameter, when present, because at least one existing implementation only implements
947            that encoding.
948         </li>
949      </ul>
950      <p id="rfc.section.D.p.3">Note that this advice is based upon UA behaviour at the time of writing, and might be superseded. At the time of publication
951         of this document, &lt;<a href=""></a>&gt; provides an overview of current levels of support in various implementations.
952      </p>
953      <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>
954      <p id="rfc.section.E.p.1">Note: the issues names in the change log entries for draft-reschke-rfc2183-in-http refer to &lt;<a href=""></a>&gt;.
955      </p>
956      <h2 id="rfc.section.E.1"><a href="#rfc.section.E.1">E.1</a>&nbsp;Since draft-reschke-rfc2183-in-http-00
957      </h2>
958      <p id="rfc.section.E.1.p.1">Adjust terminology ("header" -&gt; "header field"). Update rfc2231-in-http reference.</p>
959      <h2 id="rfc.section.E.2"><a href="#rfc.section.E.2">E.2</a>&nbsp;Since draft-reschke-rfc2183-in-http-01
960      </h2>
961      <p id="rfc.section.E.2.p.1">Update rfc2231-in-http reference. Actually define the "filename" parameter. Add internationalization considerations. Add examples
962         using the RFC 5987 encoding. Add overview over other approaches, plus a table reporting implementation status. Add and resolve
963         issue "nodep2183". Add issues "asciivsiso", "deplboth", "quoted", and "registry".
964      </p>
965      <h2 id="rfc.section.E.3"><a href="#rfc.section.E.3">E.3</a>&nbsp;Since draft-reschke-rfc2183-in-http-02
966      </h2>
967      <p id="rfc.section.E.3.p.1">Add and close issue "docfallback". Close issues "asciivsiso", "deplboth", "quoted", and "registry".</p>
968      <h2 id="rfc.section.E.4"><a href="#rfc.section.E.4">E.4</a>&nbsp;Since draft-reschke-rfc2183-in-http-03
969      </h2>
970      <p id="rfc.section.E.4.p.1">Updated to be a Working Draft of the IETF HTTPbis Working Group.</p>
971      <h2 id="rfc.section.E.5"><a href="#rfc.section.E.5">E.5</a>&nbsp;<a id="changes.since.00" href="#changes.since.00">Since draft-ietf-httpbis-content-disp-00</a></h2>
972      <p id="rfc.section.E.5.p.1">Closed issues: </p>
973      <ul>
974         <li> &lt;<a href=""></a>&gt;: "handling of unknown disposition types"
975         </li>
976      </ul>
977      <p id="rfc.section.E.5.p.2">Slightly updated the notes about the proposed fallback behavior.</p>
978      <h2 id="rfc.section.E.6"><a href="#rfc.section.E.6">E.6</a>&nbsp;<a id="changes.since.01" href="#changes.since.01">Since draft-ietf-httpbis-content-disp-01</a></h2>
979      <p id="rfc.section.E.6.p.1">Various editorial improvements.</p>
980      <h2 id="rfc.section.E.7"><a href="#rfc.section.E.7">E.7</a>&nbsp;<a id="changes.since.02" href="#changes.since.02">Since draft-ietf-httpbis-content-disp-02</a></h2>
981      <p id="rfc.section.E.7.p.1">Closed issues: </p>
982      <ul>
983         <li> &lt;<a href=""></a>&gt;: "state that repeating parameters are invalid"
984         </li>
985         <li> &lt;<a href=""></a>&gt;: "warn about %xx in filenames being misinterpreted"
986         </li>
987         <li> &lt;<a href=""></a>&gt;: "mention control chars when talking about postprecessing the filename parameter"
988         </li>
989      </ul>
990      <p id="rfc.section.E.7.p.2">Update <a href="#alternatives.implementations" title="Implementations (to be removed by RFC Editor before publication)">Appendix&nbsp;C.4</a>; Opera 10.63 RC implements the recommended fallback behavior.
991      </p>
992      <h2 id="rfc.section.E.8"><a href="#rfc.section.E.8">E.8</a>&nbsp;<a id="changes.since.03" href="#changes.since.03">Since draft-ietf-httpbis-content-disp-03</a></h2>
993      <p id="rfc.section.E.8.p.1">Closed issues: </p>
994      <ul>
995         <li> &lt;<a href=""></a>&gt;: "'modification-date' *is* implemented in Konq 4.5"
996         </li>
997         <li> &lt;<a href=""></a>&gt;: "clarify what LWS means for the Content-Disp grammar"
998         </li>
999         <li> &lt;<a href=""></a>&gt;: "Avoid passive voice in message requirements"
1000         </li>
1001         <li> &lt;<a href=""></a>&gt;: "text about historical percent-decoding unclear"
1002         </li>
1003         <li> &lt;<a href=""></a>&gt;: "add explanation of language tagging"
1004         </li>
1005         <li> &lt;<a href=""></a>&gt;: "Clarify that C-D spec does not apply to multipart upload"
1006         </li>
1007      </ul>
1008      <h2 id="rfc.section.E.9"><a href="#rfc.section.E.9">E.9</a>&nbsp;<a id="changes.since.04" href="#changes.since.04">Since draft-ietf-httpbis-content-disp-04</a></h2>
1009      <p id="rfc.section.E.9.p.1">Updated implementation information (Chrome 9 implements RFC 5987, IE 9 RC implements it for UTF-8 only).</p>
1010      <p id="rfc.section.E.9.p.2">Clarify who requirements are on, add a section discussing conformance and handling of invalid field values in general.</p>
1011      <p id="rfc.section.E.9.p.3">Closed issues: </p>
1012      <ul>
1013         <li> &lt;<a href=""></a>&gt;: "avoid stating ISO-8859-1 default for header param" (the default is still mentioned, but it was clarified what it applies
1014            to).
1015         </li>
1016         <li> &lt;<a href=""></a>&gt;: "Path Separator Characters"
1017         </li>
1018      </ul>
1019      <h2 id="rfc.section.E.10"><a href="#rfc.section.E.10">E.10</a>&nbsp;<a id="changes.since.05" href="#changes.since.05">Since draft-ietf-httpbis-content-disp-05</a></h2>
1020      <p id="rfc.section.E.10.p.1">Editorial changes: Fixed two typos where the new Conformance section said "Content-Location" instead of "Content-Disposition".
1021         Cleaned up terminology ("user agent", "recipient", "sender", "message body", ...). Stated what the escape character for quoted-string
1022         is. Explained a use case for "inline" disposition type. Updated implementation notes with respect to the fallback behavior.
1023      </p>
1024      <p id="rfc.section.E.10.p.2">Added appendix "Advice on Generating Content-Disposition Header Fields".</p>
1025      <h2 id="rfc.section.E.11"><a href="#rfc.section.E.11">E.11</a>&nbsp;<a id="changes.since.06" href="#changes.since.06">Since draft-ietf-httpbis-content-disp-06</a></h2>
1026      <p id="rfc.section.E.11.p.1">Closed issues: </p>
1027      <ul>
1028         <li> &lt;<a href=""></a>&gt;: "conformance language"
1029         </li>
1030      </ul>
1031      <h2 id="rfc.section.E.12"><a href="#rfc.section.E.12">E.12</a>&nbsp;<a id="changes.since.07" href="#changes.since.07">Since draft-ietf-httpbis-content-disp-07</a></h2>
1032      <p id="rfc.section.E.12.p.1">Rephrase the requirement about well-known file system locations, and also clarify that by "last path segment" we mean the
1033         actual filename. Added a forward reference from "invalid" to the section that defines a valid header field.
1034      </p>
1035      <h2 id="rfc.section.E.13"><a href="#rfc.section.E.13">E.13</a>&nbsp;<a id="changes.since.08" href="#changes.since.08">Since draft-ietf-httpbis-content-disp-08</a></h2>
1036      <p id="rfc.section.E.13.p.1">None yet.</p>
1037      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
1038      <p class="noprint"><a href="#rfc.index.C">C</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.I">I</a> <a href="#rfc.index.R">R</a>
1039      </p>
1040      <div class="print2col">
1041         <ul class="ind">
1042            <li><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul>
1043                  <li>Content-Disposition header field&nbsp;&nbsp;<a href="#rfc.xref.header.field.definition.1">3</a>, <a href="#rfc.iref.c.1"><b>4</b></a>, <a href="#rfc.xref.header.field.definition.2">8.2</a></li>
1044               </ul>
1045            </li>
1046            <li><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul>
1047                  <li>Header Fields&nbsp;&nbsp;
1048                     <ul>
1049                        <li>Content-Disposition&nbsp;&nbsp;<a href="#rfc.xref.header.field.definition.1">3</a>, <a href="#rfc.iref.h.1"><b>4</b></a>, <a href="#rfc.xref.header.field.definition.2">8.2</a></li>
1050                     </ul>
1051                  </li>
1052               </ul>
1053            </li>
1054            <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul>
1055                  <li><em>ISO-8859-1</em>&nbsp;&nbsp;<a href="#rfc.xref.ISO-8859-1.1">4.3</a>, <a href="#ISO-8859-1"><b>10.1</b></a>, <a href="#rfc.xref.ISO-8859-1.2">C</a></li>
1056               </ul>
1057            </li>
1058            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
1059                  <li><em>RFC2046</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2046.1">4.3</a>, <a href="#RFC2046"><b>10.2</b></a></li>
1060                  <li><em>RFC2047</em>&nbsp;&nbsp;<a href="#RFC2047"><b>10.2</b></a>, <a href="#rfc.xref.RFC2047.1">C.1</a><ul>
1061                        <li><em>Section 5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2047.1">C.1</a></li>
1062                     </ul>
1063                  </li>
1064                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">2</a>, <a href="#RFC2119"><b>10.1</b></a></li>
1065                  <li><em>RFC2183</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.1">1</a>, <a href="#rfc.xref.RFC2183.2">4.2</a>, <a href="#rfc.xref.RFC2183.3">4.4</a>, <a href="#rfc.xref.RFC2183.4">4.5</a>, <a href="#rfc.xref.RFC2183.5">8.1</a>, <a href="#RFC2183"><b>10.2</b></a>, <a href="#rfc.xref.RFC2183.6">A</a>, <a href="#rfc.xref.RFC2183.7">B</a><ul>
1066                        <li><em>Section 2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.7">B</a></li>
1067                        <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.6">A</a></li>
1068                        <li><em>Section 2.8</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.2">4.2</a>, <a href="#rfc.xref.RFC2183.3">4.4</a></li>
1069                        <li><em>Section 9</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.4">4.5</a>, <a href="#rfc.xref.RFC2183.5">8.1</a></li>
1070                     </ul>
1071                  </li>
1072                  <li><em>RFC2231</em>&nbsp;&nbsp;<a href="#RFC2231"><b>10.2</b></a>, <a href="#rfc.xref.RFC2231.1">C</a></li>
1073                  <li><em>RFC2388</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2388.1">1</a>, <a href="#RFC2388"><b>10.2</b></a></li>
1074                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">1</a>, <a href="#rfc.xref.RFC2616.2">1</a>, <a href="#rfc.xref.RFC2616.3">2</a>, <a href="#rfc.xref.RFC2616.4">4.1</a>, <a href="#rfc.xref.RFC2616.5">4.1</a>, <a href="#rfc.xref.RFC2616.6">4.1</a>, <a href="#rfc.xref.RFC2616.7">4.1</a>, <a href="#rfc.xref.RFC2616.8">4.1</a>, <a href="#rfc.xref.RFC2616.9">7</a>, <a href="#RFC2616"><b>10.1</b></a>, <a href="#rfc.xref.RFC2616.10">A</a>, <a href="#rfc.xref.RFC2616.11">C</a><ul>
1075                        <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.3">2</a>, <a href="#rfc.xref.RFC2616.8">4.1</a></li>
1076                        <li><em>Section 2.2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.5">4.1</a>, <a href="#rfc.xref.RFC2616.6">4.1</a>, <a href="#rfc.xref.RFC2616.11">C</a></li>
1077                        <li><em>Section 3.6</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.7">4.1</a></li>
1078                        <li><em>Section 15.5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.2">1</a></li>
1079                        <li><em>Section 15</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.9">7</a></li>
1080                        <li><em>Section 19.5.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">1</a>, <a href="#rfc.xref.RFC2616.10">A</a></li>
1081                     </ul>
1082                  </li>
1083                  <li><em>RFC3864</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC3864.1">8.2</a>, <a href="#RFC3864"><b>10.2</b></a></li>
1084                  <li><em>RFC3986</em>&nbsp;&nbsp;<a href="#RFC3986"><b>10.2</b></a>, <a href="#rfc.xref.RFC3986.1">C.2</a><ul>
1085                        <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC3986.1">C.2</a></li>
1086                     </ul>
1087                  </li>
1088                  <li><em>RFC5987</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5987.1">4.1</a>, <a href="#rfc.xref.RFC5987.2">4.1</a>, <a href="#rfc.xref.RFC5987.3">4.3</a>, <a href="#rfc.xref.RFC5987.4">5</a>, <a href="#rfc.xref.RFC5987.5">6</a>, <a href="#rfc.xref.RFC5987.6">7</a>, <a href="#rfc.xref.RFC5987.7">7</a>, <a href="#RFC5987"><b>10.1</b></a>, <a href="#rfc.xref.RFC5987.8">A</a>, <a href="#rfc.xref.RFC5987.9">C</a><ul>
1089                        <li><em>Section 3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5987.2">4.1</a></li>
1090                        <li><em>Section 5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5987.7">7</a></li>
1091                     </ul>
1092                  </li>
1093               </ul>
1094            </li>
1095         </ul>
1096      </div>
1097   </body>
Note: See TracBrowser for help on using the repository browser.