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

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

update rfc2629.xslt, bump up document dates

  • Property svn:eol-style set to native
File size: 56.5 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;
140table.header {
141  border-spacing: 1px;
142  width: 95%;
143  font-size: 10pt;
144  color: white;
145} {
147  vertical-align: top;
149td.topnowrap {
150  vertical-align: top;
151  white-space: nowrap;
153table.header td {
154  background-color: gray;
155  width: 50%;
157table.header a {
158  color: white;
160td.reference {
161  vertical-align: top;
162  white-space: nowrap;
163  padding-right: 1em;
165thead {
166  display:table-header-group;
168ul.toc, ul.toc ul {
169  list-style: none;
170  margin-left: 1.5em;
171  margin-right: 0em;
172  padding-left: 0em;
174ul.toc li {
175  line-height: 150%;
176  font-weight: bold;
177  font-size: 10pt;
178  margin-left: 0em;
179  margin-right: 0em;
181ul.toc li li {
182  line-height: normal;
183  font-weight: normal;
184  font-size: 9pt;
185  margin-left: 0em;
186  margin-right: 0em;
188li.excluded {
189  font-size: 0pt;
191ul p {
192  margin-left: 0em;
194ul.ind, ul.ind ul {
195  list-style: none;
196  margin-left: 1.5em;
197  margin-right: 0em;
198  padding-left: 0em;
199  page-break-before: avoid;
201ul.ind li {
202  font-weight: bold;
203  line-height: 200%;
204  margin-left: 0em;
205  margin-right: 0em;
207ul.ind li li {
208  font-weight: normal;
209  line-height: 150%;
210  margin-left: 0em;
211  margin-right: 0em;
213.avoidbreak {
214  page-break-inside: avoid;
216.bcp14 {
217  font-style: normal;
218  text-transform: lowercase;
219  font-variant: small-caps;
221blockquote > * .bcp14 {
222  font-style: italic;
224.comment {
225  background-color: yellow;
226} {
228  text-align: center;
230.error {
231  color: red;
232  font-style: italic;
233  font-weight: bold;
235.figure {
236  font-weight: bold;
237  text-align: center;
238  font-size: 9pt;
240.filename {
241  color: #333333;
242  font-weight: bold;
243  font-size: 12pt;
244  line-height: 21pt;
245  text-align: center;
247.fn {
248  font-weight: bold;
250.hidden {
251  display: none;
253.left {
254  text-align: left;
256.right {
257  text-align: right;
259.title {
260  color: #990000;
261  font-size: 18pt;
262  line-height: 18pt;
263  font-weight: bold;
264  text-align: center;
265  margin-top: 36pt;
267.vcardline {
268  display: block;
270.warning {
271  font-size: 14pt;
272  background-color: yellow;
276@media print {
277  .noprint {
278    display: none;
279  }
281  a {
282    color: black;
283    text-decoration: none;
284  }
286  table.header {
287    width: 90%;
288  }
290  td.header {
291    width: 50%;
292    color: black;
293    background-color: white;
294    vertical-align: top;
295    font-size: 12pt;
296  }
298  ul.toc a::after {
299    content: leader('.') target-counter(attr(href), page);
300  }
302  ul.ind li li a {
303    content: target-counter(attr(href), page);
304  }
306  .print2col {
307    column-count: 2;
308    -moz-column-count: 2;
309    column-fill: auto;
310  }
313@page {
314  @top-left {
315       content: "Internet-Draft";
316  }
317  @top-right {
318       content: "May 2011";
319  }
320  @top-center {
321       content: "Content-Disposition in HTTP";
322  }
323  @bottom-left {
324       content: "Reschke";
325  }
326  @bottom-center {
327       content: "Expires November 2011";
328  }
329  @bottom-right {
330       content: "[Page " counter(page) "]";
331  }
334@page:first {
335    @top-left {
336      content: normal;
337    }
338    @top-right {
339      content: normal;
340    }
341    @top-center {
342      content: normal;
343    }
345</style><link rel="Contents" href="#rfc.toc">
346      <link rel="Author" href="#rfc.authors">
347      <link rel="Copyright" href="#rfc.copyrightnotice">
348      <link rel="Index" href="#rfc.index">
349      <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
350      <link rel="Chapter" title="2 Notational Conventions" href="#rfc.section.2">
351      <link rel="Chapter" title="3 Conformance and Error Handling" href="#rfc.section.3">
352      <link rel="Chapter" title="4 Header Field Definition" href="#rfc.section.4">
353      <link rel="Chapter" title="5 Examples" href="#rfc.section.5">
354      <link rel="Chapter" title="6 Internationalization Considerations" href="#rfc.section.6">
355      <link rel="Chapter" title="7 Security Considerations" href="#rfc.section.7">
356      <link rel="Chapter" title="8 IANA Considerations" href="#rfc.section.8">
357      <link rel="Chapter" title="9 Acknowledgements" href="#rfc.section.9">
358      <link rel="Chapter" href="#rfc.section.10" title="10 References">
359      <link rel="Appendix" title="A Changes from the RFC 2616 Definition" href="#rfc.section.A">
360      <link rel="Appendix" title="B Differences Compared to RFC 2183" href="#rfc.section.B">
361      <link rel="Appendix" title="C Alternative Approaches to Internationalization" href="#rfc.section.C">
362      <link rel="Appendix" title="D Advice on Generating Content-Disposition Header Fields" href="#rfc.section.D">
363      <meta name="generator" content=", Revision 1.550, 2011-05-30 14:02:12, XSLT vendor: SAXON 8.9 from Saxonica">
364      <meta name="keywords" content="HTTP, Hypertext Transfer Protocol, Content-Disposition, filename, attachment, inline">
365      <link rel="schema.dct" href="">
366      <meta name="dct.creator" content="Reschke, J. F.">
367      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-content-disp-latest">
368      <meta name="dct.issued" scheme="ISO8601" content="2011-05">
369      <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.">
370      <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.">
371   </head>
372   <body>
373      <table class="header">
374         <tbody>
375            <tr>
376               <td class="left">HTTPbis Working Group</td>
377               <td class="right">J. Reschke</td>
378            </tr>
379            <tr>
380               <td class="left">Internet-Draft</td>
381               <td class="right">greenbytes</td>
382            </tr>
383            <tr>
384               <td class="left">Updates: <a href="">2616</a> (if approved)
385               </td>
386               <td class="right">May 2011</td>
387            </tr>
388            <tr>
389               <td class="left">Intended status: Standards Track</td>
390               <td class="right"></td>
391            </tr>
392            <tr>
393               <td class="left">Expires: November 2011</td>
394               <td class="right"></td>
395            </tr>
396         </tbody>
397      </table>
398      <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>
399      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
400      <p>RFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard.
401         This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization
402         aspects.
403      </p>
404      <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
405      <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
406      <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
407         working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href=""></a>.
408      </p>
409      <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
410         documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
411         in progress”.
412      </p>
413      <p>This Internet-Draft will expire in November 2011.</p>
414      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
415      <p>Copyright © 2011 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
416      <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
417         and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
418         text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
419         BSD License.
420      </p>
421      <hr class="noprint">
422      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
423      <ul class="toc">
424         <li>1.&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li>
425         <li>2.&nbsp;&nbsp;&nbsp;<a href="#notational.conventions">Notational Conventions</a></li>
426         <li>3.&nbsp;&nbsp;&nbsp;<a href="#conformance.and.error.handling">Conformance and Error Handling</a></li>
427         <li>4.&nbsp;&nbsp;&nbsp;<a href="#header.field.definition">Header Field Definition</a><ul>
428               <li>4.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Grammar</a></li>
429               <li>4.2&nbsp;&nbsp;&nbsp;<a href="#disposition.type">Disposition Type</a></li>
430               <li>4.3&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.filename">Disposition Parameter: 'Filename'</a></li>
431               <li>4.4&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.extensions">Disposition Parameter: Extensions</a></li>
432               <li>4.5&nbsp;&nbsp;&nbsp;<a href="#extensibility">Extensibility</a></li>
433            </ul>
434         </li>
435         <li>5.&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a></li>
436         <li>6.&nbsp;&nbsp;&nbsp;<a href="#i18n">Internationalization Considerations</a></li>
437         <li>7.&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li>
438         <li>8.&nbsp;&nbsp;&nbsp;<a href="#iana.considerations">IANA Considerations</a><ul>
439               <li>8.1&nbsp;&nbsp;&nbsp;<a href="#registry">Registry for Disposition Values and Parameters</a></li>
440               <li>8.2&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
441            </ul>
442         </li>
443         <li>9.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
444         <li>10.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
445               <li>10.1&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
446               <li>10.2&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
447            </ul>
448         </li>
449         <li><a href="#rfc.authors">Author's Address</a></li>
450         <li>A.&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc2616">Changes from the RFC 2616 Definition</a></li>
451         <li>B.&nbsp;&nbsp;&nbsp;<a href="">Differences Compared to RFC 2183</a></li>
452         <li>C.&nbsp;&nbsp;&nbsp;<a href="#alternatives">Alternative Approaches to Internationalization</a><ul>
453               <li>C.1&nbsp;&nbsp;&nbsp;<a href="#alternatives.rfc2047">RFC 2047 Encoding</a></li>
454               <li>C.2&nbsp;&nbsp;&nbsp;<a href="#alternatives.percent">Percent Encoding</a></li>
455               <li>C.3&nbsp;&nbsp;&nbsp;<a href="#alternatives.sniff">Encoding Sniffing</a></li>
456            </ul>
457         </li>
458         <li>D.&nbsp;&nbsp;&nbsp;<a href="#advice.generating">Advice on Generating Content-Disposition Header Fields</a></li>
459         <li><a href="#rfc.index">Index</a></li>
460      </ul>
461      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
462      <p id="rfc.section.1.p.1">RFC 2616 defines the Content-Disposition response header field (<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>):
463      </p>
464      <blockquote id="rfc.section.1.p.2" cite="">
465         <p>Content-Disposition is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks
466            for implementers.
467         </p>
468      </blockquote>
469      <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
470         testing with existing user agents (UAs), it fully defines a profile of the features defined in the Multipurpose Internet Mail
471         Extensions (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.
472      </p>
473      <div class="note" id="rfc.section.1.p.4">
474         <p> <b>Note:</b> This document does not apply to Content-Disposition header fields appearing in payload bodies transmitted over HTTP, such
475            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>).
476         </p>
477      </div>
478      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="notational.conventions" href="#notational.conventions">Notational Conventions</a></h1>
479      <p id="rfc.section.2.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
480         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>.
481      </p>
482      <p id="rfc.section.2.p.2">This specification uses the augmented BNF (ABNF) 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).
483      </p>
484      <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>
485      <p id="rfc.section.3.p.1">This specification defines conformance criteria for both senders (usually, HTTP origin servers) and recipients (usually, HTTP
486         user agents) of the Content-Disposition header field. An implementation is considered conformant if it complies with all of
487         the requirements associated with its role.
488      </p>
489      <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
490         (<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.
491      </p>
492      <p id="rfc.section.3.p.3">Senders <em class="bcp14">MUST NOT</em> generate Content-Disposition header fields that are invalid.
493      </p>
494      <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 behavior (e.g., the implementation is a validator). As such,
495         the default handling of invalid fields is to ignore them.
496      </p>
497      <div id="rfc.iref.h.1"></div>
498      <div id="rfc.iref.c.1"></div>
499      <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>
500      <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,
501         and also can be used to attach additional metadata, such as the filename to use when saving the response payload locally.
502      </p>
503      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Grammar
504      </h2>
505      <div id="rfc.figure.u.1"></div><pre class="inline">  content-disposition = "Content-Disposition" ":"
506                         disposition-type *( ";" disposition-parm )
508  disposition-type    = "inline" | "attachment" | disp-ext-type
509                      ; case-insensitive
510  disp-ext-type       = token
512  disposition-parm    = filename-parm | disp-ext-parm
514  filename-parm       = "filename" "=" value
515                      | "filename*" "=" ext-value
517  disp-ext-parm       = token "=" value
518                      | ext-token "=" ext-value
519  ext-token           = &lt;the characters in token, followed by "*"&gt;
520</pre><div id="rfc.figure.u.2"></div>
521      <p>Defined in <a href="#RFC2616" id="rfc.xref.RFC2616.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>:
522      </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;
523  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;
524  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;
525                ; token | quoted-string
527</pre><div id="rfc.figure.u.3"></div>
528      <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>:
529      </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;
530</pre><p id="rfc.section.4.1.p.4">Content-Disposition header field values with multiple instances of the same parameter name are invalid.</p>
531      <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.
532      </p>
533      <p id="rfc.section.4.1.p.6">Furthermore, note that the format used for ext-value allows specifying a natural language (e.g., "en"); this is of limited
534         use for filenames and is likely to be ignored by recipients.
535      </p>
536      <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>
537      <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
538         to save the response locally, rather than process it normally (as per its media type).
539      </p>
540      <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
541         type "inline" is only useful when it is augmented with additional parameters, such as the filename (see below).
542      </p>
543      <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>).
544      </p>
545      <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>
546      <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
547         for storing the message payload.
548      </p>
549      <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
550         "attachment" disposition type), or later on (for instance, when the user decides to save the contents of the current page
551         being displayed).
552      </p>
553      <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.&nbsp;1">[ISO-8859-1]</cite></a>).
554      </p>
555      <p id="rfc.section.4.3.p.4">Many user agent implementations predating this specification do not understand the "filename*" parameter. Therefore, when
556         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
557         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).
558      </p>
559      <p id="rfc.section.4.3.p.5">It is essential that recipients treat the specified filename as advisory only, and thus be very careful in extracting the
560         desired information. In particular:
561      </p>
562      <ul>
563         <li>
564            <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
565               the consequences of being able to overwrite well-known system locations (such as "/etc/passwd"). One strategy to achieve this
566               is to never trust folder name information in the filename parameter, for instance by stripping all but the last path segment
567               and only considering the actual filename (where 'path segments' are the components of the field value delimited by the path
568               separator characters "\" and "/").
569            </p>
570         </li>
571         <li>
572            <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
573               extension could introduce a privilege escalation when the saved file is later opened (consider ".exe"). Thus, recipients that
574               make use of file extensions to determine the media type <em class="bcp14">MUST</em> ensure that a file extension is used that is safe, optimally matching the media type of the received payload.
575            </p>
576         </li>
577         <li>
578            <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
579               characters and leading and trailing whitespace.
580            </p>
581         </li>
582         <li>
583            <p>Other aspects recipients need to be aware of are names that have a special meaning in the file system or in shell commands,
584               such as "." and "..", "~", "|", and also device names. Recipients <em class="bcp14">SHOULD</em> ignore or substitute names like these.
585            </p>
586         </li>
587      </ul>
588      <div class="note" id="rfc.section.4.3.p.6">
589         <p> <b>Note:</b> Many user agents do not properly handle the escape character "\" when using the quoted-string form. Furthermore, some user
590            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.
591         </p>
592      </div>
593      <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>
594      <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>).
595      </p>
596      <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;<a id="extensibility" href="#extensibility">Extensibility</a></h2>
597      <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
598         using Content-Disposition, such as MIME and HTTP. Therefore, not all registered values may make sense in the context of HTTP.
599      </p>
600      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="examples" href="#examples">Examples</a></h1>
601      <div id="rfc.figure.u.4"></div>
602      <p>Direct the UA to show "save as" dialog, with a filename of "example.html":</p>  <pre class="text">Content-Disposition: Attachment; filename=example.html
603</pre><div id="rfc.figure.u.5"></div>
604      <p>Direct the UA to behave as if the Content-Disposition header field wasn't present, but to remember the filename "an example.html"
605         for a subsequent save operation:
606      </p>  <pre class="text">Content-Disposition: INLINE; FILENAME= "an example.html"
607</pre>  <p>Note: This uses the quoted-string form so that the space character can be included.</p>
608      <div id="rfc.figure.u.6"></div>
609      <p>Direct the UA to show "save as" dialog, with a filename containing the Unicode character U+20AC (EURO SIGN):</p>  <pre class="text">Content-Disposition: attachment;
610                     filename*= UTF-8''<b>%e2%82%ac</b>%20rates
611</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.
612      </p>
613      <div id="rfc.figure.u.7"></div>
614      <p>This example is the same as the one above, but adding the "filename" parameter for compatibility with user agents not implementing
615         RFC&nbsp;5987:
616      </p>  <pre class="text">Content-Disposition: attachment;
617                     filename="EURO rates";
618                     filename*=utf-8''<b>%e2%82%ac</b>%20rates
619</pre>  <p>Note: Those user agents that do not support the RFC 5987 encoding ignore "filename*" when it occurs after "filename".</p>
620      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="i18n" href="#i18n">Internationalization Considerations</a></h1>
621      <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
622         in use.
623      </p>
624      <p id="rfc.section.6.p.2">Future parameters might also require internationalization, in which case the same encoding can be used.</p>
625      <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
626      <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>.
627      </p>
628      <p id="rfc.section.7.p.2">Furthermore, implementers 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>).
629      </p>
630      <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a id="iana.considerations" href="#iana.considerations">IANA Considerations</a></h1>
631      <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 Parameters</a></h2>
632      <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
633         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>.
634      </p>
635      <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>
636      <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
637         (see <a href="#RFC3864" id="rfc.xref.RFC3864.1"><cite title="Registration Procedures for Message Header Fields">[RFC3864]</cite></a>).
638      </p>
639      <p id="rfc.section.8.2.p.2"> </p>
640      <dl>
641         <dt>Header field name:</dt>
642         <dd>Content-Disposition</dd>
643         <dt>Applicable protocol:</dt>
644         <dd>http</dd>
645         <dt>Status:</dt>
646         <dd>standard</dd>
647         <dt>Author/Change controller:</dt>
648         <dd>IETF</dd>
649         <dt>Specification document:</dt>
650         <dd>this specification (<a href="#header.field.definition" id="rfc.xref.header.field.definition.2" title="Header Field Definition">Section&nbsp;4</a>)
651         </dd>
652         <dt>Related information:</dt>
653         <dd>none</dd>
654      </dl>
655      <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
656      </h1>
657      <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
658         Nordstrom, and Mark Nottingham for their valuable feedback.
659      </p>
660      <h1 id="rfc.references"><a id="rfc.section.10" href="#rfc.section.10">10.</a> References
661      </h1>
662      <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References
663      </h2>
664      <table>       
665         <tr>
666            <td class="reference"><b id="ISO-8859-1">[ISO-8859-1]</b></td>
667            <td class="top">International Organization for Standardization, “Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No.&nbsp;1”, ISO/IEC&nbsp;8859-1:1998, 1998.</td>
668         </tr>
669         <tr>
670            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
671            <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.
672            </td>
673         </tr>
674         <tr>
675            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
676            <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.
677            </td>
678         </tr>
679         <tr>
680            <td class="reference"><b id="RFC5987">[RFC5987]</b></td>
681            <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.
682            </td>
683         </tr>
684      </table>
685      <h2 id="rfc.references.2"><a href="#rfc.section.10.2" id="rfc.section.10.2">10.2</a> Informative References
686      </h2>
687      <table>                 
688         <tr>
689            <td class="reference"><b id="RFC2046">[RFC2046]</b></td>
690            <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.
691            </td>
692         </tr>
693         <tr>
694            <td class="reference"><b id="RFC2047">[RFC2047]</b></td>
695            <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.
696            </td>
697         </tr>
698         <tr>
699            <td class="reference"><b id="RFC2183">[RFC2183]</b></td>
700            <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, Ed.</a>, “<a href="">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</a>”, RFC&nbsp;2183, August&nbsp;1997.
701            </td>
702         </tr>
703         <tr>
704            <td class="reference"><b id="RFC2231">[RFC2231]</b></td>
705            <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.
706            </td>
707         </tr>
708         <tr>
709            <td class="reference"><b id="RFC2388">[RFC2388]</b></td>
710            <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.
711            </td>
712         </tr>
713         <tr>
714            <td class="reference"><b id="RFC3864">[RFC3864]</b></td>
715            <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.
716            </td>
717         </tr>
718         <tr>
719            <td class="reference"><b id="RFC3986">[RFC3986]</b></td>
720            <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.
721            </td>
722         </tr>
723         <tr>
724            <td class="reference"><b id="US-ASCII">[US-ASCII]</b></td>
725            <td class="top">American National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI&nbsp;X3.4, 1986.</td>
726         </tr>
727      </table>
728      <div class="avoidbreak">
729         <h1 id="rfc.authors"><a href="#rfc.authors">Author's Address</a></h1>
730         <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>
731      </div>
732      <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>
733      <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:
734      </p>
735      <ul>
736         <li>According to RFC 2616, the disposition type "attachment" only applies to content of type "application/octet-stream". This
737            restriction has been removed, because recipients in practice do not check the content type, and it also discourages properly
738            declaring the media type.
739         </li>
740         <li>RFC 2616 only allows "quoted-string" for the filename parameter. This would be an exceptional parameter syntax, and also doesn't
741            reflect actual use.
742         </li>
743         <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.
744         </li>
745         <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>.
746         </li>
747      </ul>
748      <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="" href="">Differences Compared to RFC 2183</a></h1>
749      <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
750         majority of user agents do not implement these; thus, they have been omitted from this specification.
751      </p>
752      <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="alternatives" href="#alternatives">Alternative Approaches to Internationalization</a></h1>
753      <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.&nbsp;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.
754      </p>
755      <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
756         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>).
757      </p>
758      <p id="rfc.section.C.p.3">For completeness, the sections below describe the various approaches that have been tried, and explain how they are inferior
759         to the RFC&nbsp;5987 encoding used in this specification.
760      </p>
761      <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>
762      <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
763         — 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>:
764      </p>
765      <blockquote id="rfc.section.C.1.p.2" cite="">
766         <p>An 'encoded-word' MUST NOT appear within a 'quoted-string'.</p> 
767         <p>...</p> 
768         <p>An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured
769            field body except within a 'comment' or 'phrase'.
770         </p>
771      </blockquote>
772      <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
773         confused by it.
774      </p>
775      <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>
776      <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
777         of the referring page, the user agent's locale, its configuration, and also the actual value of the parameter.
778      </p>
779      <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
780         to the user. For those user agents that do implement this, it is difficult to predict what character encoding they actually
781         expect.
782      </p>
783      <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>
784      <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
785         to be more likely to be the correct interpretation.
786      </p>
787      <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>
788      <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>
789      <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
790         to:
791      </p>
792      <p id="rfc.section.D.p.2"> </p>
793      <ul>
794         <li>Include a "filename" parameter when US-ASCII (<a href="#US-ASCII" id="rfc.xref.US-ASCII.1"><cite title="Coded Character Set -- 7-bit American Standard Code for Information Interchange">[US-ASCII]</cite></a>) is sufficiently expressive.
795         </li>
796         <li>Use the 'token' form of the filename parameter only when it does not contain disallowed characters (e.g., spaces); in such
797            cases, the quoted-string form should be used.
798         </li>
799         <li>Avoid including the percent character followed by two hexadecimal characters (e.g., %A9) in the filename parameter, since
800            some existing implementations consider it to be an escape character, while others will pass it through unchanged.
801         </li>
802         <li>Avoid including the "\" character in the quoted-string form of the filename parameter, as escaping is not implemented by some
803            user agents, and "\" can be considered an illegal path character.
804         </li>
805         <li>Avoid using non-ASCII characters in the filename parameter. Although most existing implementations will decode them as ISO‑8859‑1,
806            some will apply heuristics to detect UTF-8, and thus might fail on certain names.
807         </li>
808         <li>Include a "filename*" parameter where the desired filename cannot be expressed faithfully using the "filename" form. Note
809            that legacy user agents will not process this, and will fall back to using the "filename" parameter's content.
810         </li>
811         <li>When a "filename*" parameter is sent, to also generate a "filename" parameter as a fallback for user agents that do not support
812            the "filename*" form, if possible. This can be done by substituting characters with US-ASCII sequences (e.g., Unicode character
813            point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by "ae"). Note that this may not be possible in some locales.
814         </li>
815         <li>When a "filename" parameter is included as a fallback (as per above), "filename" should occur first, due to parsing problems
816            in some existing implementations.
817         </li>
818         <li>Use UTF-8 as the encoding of the "filename*" parameter, when present, because at least one existing implementation only implements
819            that encoding.
820         </li>
821      </ul>
822      <p id="rfc.section.D.p.3">Note that this advice is based upon UA behavior at the time of writing, and might be superseded. At the time of publication
823         of this document, &lt;<a href=""></a>&gt; provides an overview of current levels of support in various implementations.
824      </p>
825      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
826      <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> <a href="#rfc.index.U">U</a>
827      </p>
828      <div class="print2col">
829         <ul class="ind">
830            <li><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul>
831                  <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>
832               </ul>
833            </li>
834            <li><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul>
835                  <li>Header Fields&nbsp;&nbsp;
836                     <ul>
837                        <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>
838                     </ul>
839                  </li>
840               </ul>
841            </li>
842            <li><a id="rfc.index.I" href="#rfc.index.I"><b>I</b></a><ul>
843                  <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>
844               </ul>
845            </li>
846            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
847                  <li><em>RFC2046</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2046.1">4.3</a>, <a href="#RFC2046"><b>10.2</b></a></li>
848                  <li><em>RFC2047</em>&nbsp;&nbsp;<a href="#RFC2047"><b>10.2</b></a>, <a href="#rfc.xref.RFC2047.1">C.1</a><ul>
849                        <li><em>Section 5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2047.1">C.1</a></li>
850                     </ul>
851                  </li>
852                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">2</a>, <a href="#RFC2119"><b>10.1</b></a></li>
853                  <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>
854                        <li><em>Section 2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.7">B</a></li>
855                        <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2183.6">A</a></li>
856                        <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>
857                        <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>
858                     </ul>
859                  </li>
860                  <li><em>RFC2231</em>&nbsp;&nbsp;<a href="#RFC2231"><b>10.2</b></a>, <a href="#rfc.xref.RFC2231.1">C</a></li>
861                  <li><em>RFC2388</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2388.1">1</a>, <a href="#RFC2388"><b>10.2</b></a></li>
862                  <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>
863                        <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>
864                        <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>
865                        <li><em>Section 3.6</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.7">4.1</a></li>
866                        <li><em>Section 15.5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.2">1</a></li>
867                        <li><em>Section 15</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.9">7</a></li>
868                        <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>
869                     </ul>
870                  </li>
871                  <li><em>RFC3864</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC3864.1">8.2</a>, <a href="#RFC3864"><b>10.2</b></a></li>
872                  <li><em>RFC3986</em>&nbsp;&nbsp;<a href="#RFC3986"><b>10.2</b></a>, <a href="#rfc.xref.RFC3986.1">C.2</a><ul>
873                        <li><em>Section 2.1</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC3986.1">C.2</a></li>
874                     </ul>
875                  </li>
876                  <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>
877                        <li><em>Section 3.2</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5987.2">4.1</a></li>
878                        <li><em>Section 5</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC5987.7">7</a></li>
879                     </ul>
880                  </li>
881               </ul>
882            </li>
883            <li><a id="rfc.index.U" href="#rfc.index.U"><b>U</b></a><ul>
884                  <li><em>US-ASCII</em>&nbsp;&nbsp;<a href="#US-ASCII"><b>10.2</b></a>, <a href="#rfc.xref.US-ASCII.1">D</a></li>
885               </ul>
886            </li>
887         </ul>
888      </div>
889   </body>
Note: See TracBrowser for help on using the repository browser.