Ignore:
Timestamp:
20/01/14 07:43:53 (7 years ago)
Author:
julian.reschke@…
Message:

update rfc2617.xml (ABNF alignment was off from published version), regen all HTML

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/orig/rfc6266.html

    r1305 r2564  
    22  PUBLIC "-//W3C//DTD HTML 4.01//EN">
    33<html lang="en">
    4    <head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
     4   <head profile="http://dublincore.org/documents/2008/08/04/dc-html/">
    55      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    66      <title>Use of the Content-Disposition&nbsp;Header&nbsp;Field
     
    3333body {
    3434  color: black;
    35   font-family: verdana, helvetica, arial, sans-serif;
    36   font-size: 10pt;
     35  font-family: cambria, helvetica, arial, sans-serif;
     36  font-size: 11pt;
     37  margin-right: 2em;
    3738}
    3839cite {
     
    4243  margin-left: 2em;
    4344}
    44 dd {
    45   margin-right: 2em;
    46 }
    4745dl {
    4846  margin-left: 2em;
    4947}
    50 
    5148ul.empty {
    5249  list-style-type: none;
     
    6259}
    6360h1 {
    64   font-size: 14pt;
     61  font-size: 130%;
    6562  line-height: 21pt;
    6663  page-break-after: avoid;
     
    6966  page-break-before: always;
    7067}
    71 h1 a {
    72   color: #333333;
    73 }
    7468h2 {
    75   font-size: 12pt;
     69  font-size: 120%;
    7670  line-height: 15pt;
    7771  page-break-after: avoid;
    7872}
    79 h3, h4, h5, h6 {
    80   font-size: 10pt;
     73h3 {
     74  font-size: 110%;
    8175  page-break-after: avoid;
    8276}
    83 h2 a, h3 a, h4 a, h5 a, h6 a {
     77h4, h5, h6 {
     78  page-break-after: avoid;
     79}
     80h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    8481  color: black;
    8582}
     
    8986li {
    9087  margin-left: 2em;
    91   margin-right: 2em;
    9288}
    9389ol {
    9490  margin-left: 2em;
    95   margin-right: 2em;
    9691}
    9792ol.la {
     
    106101p {
    107102  margin-left: 2em;
    108   margin-right: 2em;
    109103}
    110104pre {
     
    112106  background-color: lightyellow;
    113107  padding: .25em;
     108  page-break-inside: avoid;
    114109}
    115110pre.text2 {
     
    141136  border-spacing: 1px;
    142137  width: 95%;
    143   font-size: 10pt;
     138  font-size: 11pt;
    144139  color: white;
    145140}
     
    149144td.topnowrap {
    150145  vertical-align: top;
    151   white-space: nowrap; 
     146  white-space: nowrap;
    152147}
    153148table.header td {
     
    169164  list-style: none;
    170165  margin-left: 1.5em;
    171   margin-right: 0em;
    172166  padding-left: 0em;
    173167}
     
    175169  line-height: 150%;
    176170  font-weight: bold;
    177   font-size: 10pt;
    178171  margin-left: 0em;
    179   margin-right: 0em;
    180172}
    181173ul.toc li li {
    182174  line-height: normal;
    183175  font-weight: normal;
    184   font-size: 9pt;
     176  font-size: 10pt;
    185177  margin-left: 0em;
    186   margin-right: 0em;
    187178}
    188179li.excluded {
     
    191182ul p {
    192183  margin-left: 0em;
     184}
     185.title, .filename, h1, h2, h3, h4 {
     186  font-family: candara, helvetica, arial, sans-serif;
     187}
     188samp, tt, code, pre {
     189  font: consolas, monospace;
    193190}
    194191.bcp14 {
     
    214211  font-weight: bold;
    215212  text-align: center;
    216   font-size: 9pt;
     213  font-size: 10pt;
    217214}
    218215.filename {
    219216  color: #333333;
     217  font-size: 75%;
    220218  font-weight: bold;
    221   font-size: 12pt;
    222219  line-height: 21pt;
    223220  text-align: center;
     
    226223  font-weight: bold;
    227224}
    228 .hidden {
    229   display: none;
    230 }
    231225.left {
    232226  text-align: left;
     
    236230}
    237231.title {
    238   color: #990000;
    239   font-size: 18pt;
     232  color: green;
     233  font-size: 150%;
    240234  line-height: 18pt;
    241235  font-weight: bold;
     
    243237  margin-top: 36pt;
    244238}
    245 .vcardline {
    246   display: block;
    247 }
    248239.warning {
    249   font-size: 14pt;
     240  font-size: 130%;
    250241  background-color: yellow;
    251242}
     
    256247    display: none;
    257248  }
    258  
     249
    259250  a {
    260251    color: black;
     
    271262    background-color: white;
    272263    vertical-align: top;
    273     font-size: 12pt;
    274   }
    275 
    276   ul.toc a::after {
     264    font-size: 110%;
     265  }
     266
     267  ul.toc a:nth-child(2)::after {
    277268    content: leader('.') target-counter(attr(href), page);
    278269  }
    279  
     270
    280271  ul.ind li li a {
    281272    content: target-counter(attr(href), page);
    282273  }
    283  
     274
    284275  .print2col {
    285276    column-count: 2;
     
    291282@page {
    292283  @top-left {
    293        content: "RFC 6266"; 
    294   } 
     284       content: "RFC 6266";
     285  }
    295286  @top-right {
    296        content: "June 2011"; 
    297   } 
     287       content: "June 2011";
     288  }
    298289  @top-center {
    299        content: "Content-Disposition in HTTP"; 
    300   } 
     290       content: "Content-Disposition in HTTP";
     291  }
    301292  @bottom-left {
    302        content: "Reschke"; 
    303   } 
     293       content: "Reschke";
     294  }
    304295  @bottom-center {
    305        content: "Standards Track"; 
    306   } 
     296       content: "Standards Track";
     297  }
    307298  @bottom-right {
    308        content: "[Page " counter(page) "]"; 
    309   } 
    310 }
    311 
    312 @page:first { 
     299       content: "[Page " counter(page) "]";
     300  }
     301}
     302
     303@page:first {
    313304    @top-left {
    314305      content: normal;
     
    341332      <link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc6266">
    342333      <link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc6266">
    343       <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.550, 2011-05-30 14:02:12, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
     334      <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.611, 2013/11/27 12:23:51, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
    344335      <meta name="keywords" content="HTTP, Hypertext Transfer Protocol, Content-Disposition, filename, attachment, inline">
    345336      <link rel="schema.dct" href="http://purl.org/dc/terms/">
     
    377368      </table>
    378369      <p class="title">Use of the Content-Disposition&nbsp;Header&nbsp;Field in the Hypertext&nbsp;Transfer&nbsp;Protocol&nbsp;(HTTP)</p>
    379       <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> 
     370      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
    380371      <p>RFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard.
    381372         This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization
    382373         aspects.
    383       </p>
    384       <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
    385       <p>This is an Internet Standards Track document.</p>
    386       <p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community.
    387          It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further
    388          information on Internet Standards is available in Section 2 of RFC 5741.
    389374      </p>
    390       <p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc6266">http://www.rfc-editor.org/info/rfc6266</a>.
    391       </p>
    392       <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    393       <p>Copyright © 2011 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
    394       <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
    395          and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
    396          text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
    397          BSD License.
    398       </p>
     375      <div id="rfc.status">
     376         <h1><a href="#rfc.status">Status of This Memo</a></h1>
     377         <p>This is an Internet Standards Track document.</p>
     378         <p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community.
     379            It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further
     380            information on Internet Standards is available in Section 2 of RFC 5741.
     381         </p>
     382         <p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc6266">http://www.rfc-editor.org/info/rfc6266</a>.
     383         </p>
     384      </div>
     385      <div id="rfc.copyrightnotice">
     386         <h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1>
     387         <p>Copyright © 2011 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     388         <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
     389            and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
     390            text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
     391            BSD License.
     392         </p>
     393      </div>
    399394      <hr class="noprint">
    400395      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
    401396      <ul class="toc">
    402          <li>1.&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li>
    403          <li>2.&nbsp;&nbsp;&nbsp;<a href="#notational.conventions">Notational Conventions</a></li>
    404          <li>3.&nbsp;&nbsp;&nbsp;<a href="#conformance.and.error.handling">Conformance and Error Handling</a></li>
    405          <li>4.&nbsp;&nbsp;&nbsp;<a href="#header.field.definition">Header Field Definition</a><ul>
    406                <li>4.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Grammar</a></li>
    407                <li>4.2&nbsp;&nbsp;&nbsp;<a href="#disposition.type">Disposition Type</a></li>
    408                <li>4.3&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.filename">Disposition Parameter: 'Filename'</a></li>
    409                <li>4.4&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.extensions">Disposition Parameter: Extensions</a></li>
    410                <li>4.5&nbsp;&nbsp;&nbsp;<a href="#extensibility">Extensibility</a></li>
     397         <li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li>
     398         <li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#notational.conventions">Notational Conventions</a></li>
     399         <li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#conformance.and.error.handling">Conformance and Error Handling</a></li>
     400         <li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.definition">Header Field Definition</a><ul>
     401               <li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Grammar</a></li>
     402               <li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#disposition.type">Disposition Type</a></li>
     403               <li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.filename">Disposition Parameter: 'Filename'</a></li>
     404               <li><a href="#rfc.section.4.4">4.4</a>&nbsp;&nbsp;&nbsp;<a href="#disposition.parameter.extensions">Disposition Parameter: Extensions</a></li>
     405               <li><a href="#rfc.section.4.5">4.5</a>&nbsp;&nbsp;&nbsp;<a href="#extensibility">Extensibility</a></li>
    411406            </ul>
    412407         </li>
    413          <li>5.&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a></li>
    414          <li>6.&nbsp;&nbsp;&nbsp;<a href="#i18n">Internationalization Considerations</a></li>
    415          <li>7.&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li>
    416          <li>8.&nbsp;&nbsp;&nbsp;<a href="#iana.considerations">IANA Considerations</a><ul>
    417                <li>8.1&nbsp;&nbsp;&nbsp;<a href="#registry">Registry for Disposition Values and Parameters</a></li>
    418                <li>8.2&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
     408         <li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#examples">Examples</a></li>
     409         <li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#i18n">Internationalization Considerations</a></li>
     410         <li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li>
     411         <li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#iana.considerations">IANA Considerations</a><ul>
     412               <li><a href="#rfc.section.8.1">8.1</a>&nbsp;&nbsp;&nbsp;<a href="#registry">Registry for Disposition Values and Parameters</a></li>
     413               <li><a href="#rfc.section.8.2">8.2</a>&nbsp;&nbsp;&nbsp;<a href="#header.field.registration">Header Field Registration</a></li>
    419414            </ul>
    420415         </li>
    421          <li>9.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
    422          <li>10.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
    423                <li>10.1&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
    424                <li>10.2&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
     416         <li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
     417         <li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul>
     418               <li><a href="#rfc.section.10.1">10.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li>
     419               <li><a href="#rfc.section.10.2">10.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li>
    425420            </ul>
    426421         </li>
    427422         <li><a href="#rfc.authors">Author's Address</a></li>
    428          <li>A.&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc2616">Changes from the RFC 2616 Definition</a></li>
    429          <li>B.&nbsp;&nbsp;&nbsp;<a href="#diffs.compared.to.rfc2183">Differences Compared to RFC 2183</a></li>
    430          <li>C.&nbsp;&nbsp;&nbsp;<a href="#alternatives">Alternative Approaches to Internationalization</a><ul>
    431                <li>C.1&nbsp;&nbsp;&nbsp;<a href="#alternatives.rfc2047">RFC 2047 Encoding</a></li>
    432                <li>C.2&nbsp;&nbsp;&nbsp;<a href="#alternatives.percent">Percent Encoding</a></li>
    433                <li>C.3&nbsp;&nbsp;&nbsp;<a href="#alternatives.sniff">Encoding Sniffing</a></li>
     423         <li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#changes.from.rfc2616">Changes from the RFC 2616 Definition</a></li>
     424         <li><a href="#rfc.section.B">B.</a>&nbsp;&nbsp;&nbsp;<a href="#diffs.compared.to.rfc2183">Differences Compared to RFC 2183</a></li>
     425         <li><a href="#rfc.section.C">C.</a>&nbsp;&nbsp;&nbsp;<a href="#alternatives">Alternative Approaches to Internationalization</a><ul>
     426               <li><a href="#rfc.section.C.1">C.1</a>&nbsp;&nbsp;&nbsp;<a href="#alternatives.rfc2047">RFC 2047 Encoding</a></li>
     427               <li><a href="#rfc.section.C.2">C.2</a>&nbsp;&nbsp;&nbsp;<a href="#alternatives.percent">Percent Encoding</a></li>
     428               <li><a href="#rfc.section.C.3">C.3</a>&nbsp;&nbsp;&nbsp;<a href="#alternatives.sniff">Encoding Sniffing</a></li>
    434429            </ul>
    435430         </li>
    436          <li>D.&nbsp;&nbsp;&nbsp;<a href="#advice.generating">Advice on Generating Content-Disposition Header Fields</a></li>
     431         <li><a href="#rfc.section.D">D.</a>&nbsp;&nbsp;&nbsp;<a href="#advice.generating">Advice on Generating Content-Disposition Header Fields</a></li>
    437432      </ul>
    438       <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="introduction" href="#introduction">Introduction</a></h1>
    439       <p id="rfc.section.1.p.1">RFC 2616 defines the Content-Disposition response header field (<a href="http://tools.ietf.org/html/rfc2616#section-19.5.1">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="http://tools.ietf.org/html/rfc2616#section-15.5" id="rfc.xref.RFC2616.2">Section 15.5</a>):
    440       </p>
    441       <blockquote id="rfc.section.1.p.2" cite="http://tools.ietf.org/html/rfc2616#section-15.5">
    442          <p>Content-Disposition is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks
    443             for implementers.
    444          </p>
    445       </blockquote>
    446       <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
    447          testing with existing user agents (UAs), it fully defines a profile of the features defined in the Multipurpose Internet Mail
    448          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.
    449       </p>
    450       <div class="note" id="rfc.section.1.p.4">
    451          <p> <b>Note:</b> This document does not apply to Content-Disposition header fields appearing in payload bodies transmitted over HTTP, such
    452             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>).
    453          </p>
    454       </div>
    455       <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="notational.conventions" href="#notational.conventions">Notational Conventions</a></h1>
    456       <p id="rfc.section.2.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
    457          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>.
    458       </p>
    459       <p id="rfc.section.2.p.2">This specification uses the augmented BNF (ABNF) notation defined in <a href="http://tools.ietf.org/html/rfc2616#section-2.1">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).
    460       </p>
    461       <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>
    462       <p id="rfc.section.3.p.1">This specification defines conformance criteria for both senders (usually, HTTP origin servers) and recipients (usually, HTTP
    463          user agents) of the Content-Disposition header field. An implementation is considered conformant if it complies with all of
    464          the requirements associated with its role.
    465       </p>
    466       <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
    467          (<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.
    468       </p>
    469       <p id="rfc.section.3.p.3">Senders <em class="bcp14">MUST NOT</em> generate Content-Disposition header fields that are invalid.
    470       </p>
    471       <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,
    472          the default handling of invalid fields is to ignore them.
    473       </p>
    474       <div id="rfc.iref.h.1"></div>
    475       <div id="rfc.iref.c.1"></div>
    476       <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>
    477       <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,
    478          and also can be used to attach additional metadata, such as the filename to use when saving the response payload locally.
    479       </p>
    480       <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Grammar
    481       </h2>
    482       <div id="rfc.figure.u.1"></div><pre class="inline">  content-disposition = "Content-Disposition" ":"
     433      <div id="introduction">
     434         <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h1>
     435         <p id="rfc.section.1.p.1">RFC 2616 defines the Content-Disposition response header field (<a href="http://tools.ietf.org/html/rfc2616#section-19.5.1">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="http://tools.ietf.org/html/rfc2616#section-15.5" id="rfc.xref.RFC2616.2">Section 15.5</a>):
     436         </p>
     437         <blockquote id="rfc.section.1.p.2" cite="http://tools.ietf.org/html/rfc2616#section-15.5">
     438            <p>Content-Disposition is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks
     439               for implementers.
     440            </p>
     441         </blockquote>
     442         <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
     443            testing with existing user agents (UAs), it fully defines a profile of the features defined in the Multipurpose Internet Mail
     444            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.
     445         </p>
     446         <div class="note" id="rfc.section.1.p.4">
     447            <p><b>Note:</b> This document does not apply to Content-Disposition header fields appearing in payload bodies transmitted over HTTP, such
     448               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>).
     449            </p>
     450         </div>
     451      </div>
     452      <div id="notational.conventions">
     453         <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#notational.conventions">Notational Conventions</a></h1>
     454         <p id="rfc.section.2.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
     455            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>.
     456         </p>
     457         <p id="rfc.section.2.p.2">This specification uses the augmented BNF (ABNF) notation defined in <a href="http://tools.ietf.org/html/rfc2616#section-2.1">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).
     458         </p>
     459      </div>
     460      <div id="conformance.and.error.handling">
     461         <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#conformance.and.error.handling">Conformance and Error Handling</a></h1>
     462         <p id="rfc.section.3.p.1">This specification defines conformance criteria for both senders (usually, HTTP origin servers) and recipients (usually, HTTP
     463            user agents) of the Content-Disposition header field. An implementation is considered conformant if it complies with all of
     464            the requirements associated with its role.
     465         </p>
     466         <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
     467            (<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.
     468         </p>
     469         <p id="rfc.section.3.p.3">Senders <em class="bcp14">MUST NOT</em> generate Content-Disposition header fields that are invalid.
     470         </p>
     471         <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,
     472            the default handling of invalid fields is to ignore them.
     473         </p>
     474      </div>
     475      <div id="header.field.definition">
     476         <div id="rfc.iref.h.1"></div>
     477         <div id="rfc.iref.c.1"></div>
     478         <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#header.field.definition">Header Field Definition</a></h1>
     479         <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,
     480            and also can be used to attach additional metadata, such as the filename to use when saving the response payload locally.
     481         </p>
     482         <div>
     483            <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Grammar
     484            </h2>
     485            <div id="rfc.figure.u.1"></div><pre class="inline">  content-disposition = "Content-Disposition" ":"
    483486                         disposition-type *( ";" disposition-parm )
    484487
     
    495498                      | ext-token "=" ext-value
    496499  ext-token           = &lt;the characters in token, followed by "*"&gt;
    497 </pre><div id="rfc.figure.u.2"></div> 
    498       <p>Defined in <a href="#RFC2616" id="rfc.xref.RFC2616.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>:
    499       </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="http://tools.ietf.org/html/rfc2616#section-2.2">Section 2.2</a>&gt;
     500</pre><div id="rfc.figure.u.2"></div>
     501            <p>Defined in <a href="#RFC2616" id="rfc.xref.RFC2616.4"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>:
     502            </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="http://tools.ietf.org/html/rfc2616#section-2.2">Section 2.2</a>&gt;
    500503  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="http://tools.ietf.org/html/rfc2616#section-2.2">Section 2.2</a>&gt;
    501504  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="http://tools.ietf.org/html/rfc2616#section-3.6">Section 3.6</a>&gt;
    502505                ; token | quoted-string
    503506             
    504 </pre><div id="rfc.figure.u.3"></div> 
    505       <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>:
    506       </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="http://tools.ietf.org/html/rfc5987#section-3.2">Section 3.2</a>&gt;
     507</pre><div id="rfc.figure.u.3"></div>
     508            <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>:
     509            </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="http://tools.ietf.org/html/rfc5987#section-3.2">Section 3.2</a>&gt;
    507510</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>
    508       <p id="rfc.section.4.1.p.5">Note that due to the rules for implied linear whitespace (<a href="http://tools.ietf.org/html/rfc2616#section-2.1">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.
    509       </p>
    510       <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
    511          use for filenames and is likely to be ignored by recipients.
    512       </p>
    513       <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>
    514       <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
    515          to save the response locally, rather than process it normally (as per its media type).
    516       </p>
    517       <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
    518          type "inline" is only useful when it is augmented with additional parameters, such as the filename (see below).
    519       </p>
    520       <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="http://tools.ietf.org/html/rfc2183#section-2.8">Section 2.8</a>).
    521       </p>
    522       <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>
    523       <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
    524          for storing the message payload.
    525       </p>
    526       <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
    527          "attachment" disposition type), or later on (for instance, when the user decides to save the contents of the current page
    528          being displayed).
    529       </p>
    530       <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>).
    531       </p>
    532       <p id="rfc.section.4.3.p.4">Many user agent implementations predating this specification do not understand the "filename*" parameter. Therefore, when
    533          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
    534          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).
    535       </p>
    536       <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
    537          desired information. In particular:
    538       </p>
    539       <ul>
    540          <li>
    541             <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
    542                the consequences of being able to overwrite well-known system locations (such as "/etc/passwd"). One strategy to achieve this
    543                is to never trust folder name information in the filename parameter, for instance by stripping all but the last path segment
    544                and only considering the actual filename (where 'path segments' are the components of the field value delimited by the path
    545                separator characters "\" and "/").
    546             </p>
    547          </li>
    548          <li>
    549             <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
    550                extension could introduce a privilege escalation when the saved file is later opened (consider ".exe"). Thus, recipients that
    551                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.
    552             </p>
    553          </li>
    554          <li>
    555             <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
    556                characters and leading and trailing whitespace.
    557             </p>
    558          </li>
    559          <li>
    560             <p>Other aspects recipients need to be aware of are names that have a special meaning in the file system or in shell commands,
    561                such as "." and "..", "~", "|", and also device names. Recipients <em class="bcp14">SHOULD</em> ignore or substitute names like these.
    562             </p>
    563          </li>
    564       </ul>
    565       <div class="note" id="rfc.section.4.3.p.6">
    566          <p> <b>Note:</b> Many user agents do not properly handle the escape character "\" when using the quoted-string form. Furthermore, some user
    567             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.
    568          </p>
    569       </div>
    570       <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>
    571       <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="http://tools.ietf.org/html/rfc2183#section-2.8">Section 2.8</a>).
    572       </p>
    573       <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;<a id="extensibility" href="#extensibility">Extensibility</a></h2>
    574       <p id="rfc.section.4.5.p.1">Note that <a href="http://tools.ietf.org/html/rfc2183#section-9">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
    575          using Content-Disposition, such as MIME and HTTP. Therefore, not all registered values may make sense in the context of HTTP.
    576       </p>
    577       <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a id="examples" href="#examples">Examples</a></h1>
    578       <div id="rfc.figure.u.4"></div>
    579       <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
    580 </pre><div id="rfc.figure.u.5"></div>
    581       <p>Direct the UA to behave as if the Content-Disposition header field wasn't present, but to remember the filename "an example.html"
    582          for a subsequent save operation:
    583       </p>  <pre class="text">Content-Disposition: INLINE; FILENAME= "an example.html"
    584 </pre>  <p>Note: This uses the quoted-string form so that the space character can be included.</p>
    585       <div id="rfc.figure.u.6"></div>
    586       <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;
     511            <p id="rfc.section.4.1.p.5">Note that due to the rules for implied linear whitespace (<a href="http://tools.ietf.org/html/rfc2616#section-2.1">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.
     512            </p>
     513            <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
     514               use for filenames and is likely to be ignored by recipients.
     515            </p>
     516         </div>
     517         <div id="disposition.type">
     518            <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;<a href="#disposition.type">Disposition Type</a></h2>
     519            <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
     520               to save the response locally, rather than process it normally (as per its media type).
     521            </p>
     522            <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
     523               type "inline" is only useful when it is augmented with additional parameters, such as the filename (see below).
     524            </p>
     525            <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="http://tools.ietf.org/html/rfc2183#section-2.8">Section 2.8</a>).
     526            </p>
     527         </div>
     528         <div id="disposition.parameter.filename">
     529            <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;<a href="#disposition.parameter.filename">Disposition Parameter: 'Filename'</a></h2>
     530            <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
     531               for storing the message payload.
     532            </p>
     533            <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
     534               "attachment" disposition type), or later on (for instance, when the user decides to save the contents of the current page
     535               being displayed).
     536            </p>
     537            <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>).
     538            </p>
     539            <p id="rfc.section.4.3.p.4">Many user agent implementations predating this specification do not understand the "filename*" parameter. Therefore, when
     540               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
     541               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).
     542            </p>
     543            <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
     544               desired information. In particular:
     545            </p>
     546            <ul>
     547               <li>
     548                  <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
     549                     the consequences of being able to overwrite well-known system locations (such as "/etc/passwd"). One strategy to achieve this
     550                     is to never trust folder name information in the filename parameter, for instance by stripping all but the last path segment
     551                     and only considering the actual filename (where 'path segments' are the components of the field value delimited by the path
     552                     separator characters "\" and "/").
     553                  </p>
     554               </li>
     555               <li>
     556                  <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
     557                     extension could introduce a privilege escalation when the saved file is later opened (consider ".exe"). Thus, recipients that
     558                     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.
     559                  </p>
     560               </li>
     561               <li>
     562                  <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
     563                     characters and leading and trailing whitespace.
     564                  </p>
     565               </li>
     566               <li>
     567                  <p>Other aspects recipients need to be aware of are names that have a special meaning in the file system or in shell commands,
     568                     such as "." and "..", "~", "|", and also device names. Recipients <em class="bcp14">SHOULD</em> ignore or substitute names like these.
     569                  </p>
     570               </li>
     571            </ul>
     572            <div class="note" id="rfc.section.4.3.p.6">
     573               <p><b>Note:</b> Many user agents do not properly handle the escape character "\" when using the quoted-string form. Furthermore, some user
     574                  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.
     575               </p>
     576            </div>
     577         </div>
     578         <div id="disposition.parameter.extensions">
     579            <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;<a href="#disposition.parameter.extensions">Disposition Parameter: Extensions</a></h2>
     580            <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="http://tools.ietf.org/html/rfc2183#section-2.8">Section 2.8</a>).
     581            </p>
     582         </div>
     583         <div id="extensibility">
     584            <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;<a href="#extensibility">Extensibility</a></h2>
     585            <p id="rfc.section.4.5.p.1">Note that <a href="http://tools.ietf.org/html/rfc2183#section-9">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
     586               using Content-Disposition, such as MIME and HTTP. Therefore, not all registered values may make sense in the context of HTTP.
     587            </p>
     588         </div>
     589      </div>
     590      <div id="examples">
     591         <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;<a href="#examples">Examples</a></h1>
     592         <div id="rfc.figure.u.4"></div>
     593         <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
     594</pre><div id="rfc.figure.u.5"></div>
     595         <p>Direct the UA to behave as if the Content-Disposition header field wasn't present, but to remember the filename "an example.html"
     596            for a subsequent save operation:
     597         </p><pre class="text">Content-Disposition: INLINE; FILENAME= "an example.html"
     598</pre><p>Note: This uses the quoted-string form so that the space character can be included.</p>
     599         <div id="rfc.figure.u.6"></div>
     600         <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;
    587601                     filename*= UTF-8''<b>%e2%82%ac</b>%20rates
    588 </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.
    589       </p>
    590       <div id="rfc.figure.u.7"></div>
    591       <p>This example is the same as the one above, but adding the "filename" parameter for compatibility with user agents not implementing
    592          RFC&nbsp;5987:
    593       </p>  <pre class="text">Content-Disposition: attachment;
     602</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.
     603         </p>
     604         <div id="rfc.figure.u.7"></div>
     605         <p>This example is the same as the one above, but adding the "filename" parameter for compatibility with user agents not implementing
     606            RFC&nbsp;5987:
     607         </p><pre class="text">Content-Disposition: attachment;
    594608                     filename="EURO rates";
    595609                     filename*=utf-8''<b>%e2%82%ac</b>%20rates
    596 </pre>  <p>Note: Those user agents that do not support the RFC 5987 encoding ignore "filename*" when it occurs after "filename".</p>
    597       <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a id="i18n" href="#i18n">Internationalization Considerations</a></h1>
    598       <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
    599          in use.
    600       </p>
    601       <p id="rfc.section.6.p.2">Future parameters might also require internationalization, in which case the same encoding can be used.</p>
    602       <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a id="security.considerations" href="#security.considerations">Security Considerations</a></h1>
    603       <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>.
    604       </p>
    605       <p id="rfc.section.7.p.2">Furthermore, implementers ought to be aware of the security considerations applying to HTTP (see <a href="http://tools.ietf.org/html/rfc2616#section-15">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="http://tools.ietf.org/html/rfc5987#section-5" id="rfc.xref.RFC5987.7">Section 5</a>).
    606       </p>
    607       <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a id="iana.considerations" href="#iana.considerations">IANA Considerations</a></h1>
    608       <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>
    609       <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
    610          are defined in <a href="http://tools.ietf.org/html/rfc2183#section-9">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>.
    611       </p>
    612       <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>
    613       <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
    614          (see <a href="#RFC3864" id="rfc.xref.RFC3864.1"><cite title="Registration Procedures for Message Header Fields">[RFC3864]</cite></a>).
    615       </p>
    616       <p id="rfc.section.8.2.p.2"> </p>
    617       <dl>
    618          <dt>Header field name:</dt>
    619          <dd>Content-Disposition</dd>
    620          <dt>Applicable protocol:</dt>
    621          <dd>http</dd>
    622          <dt>Status:</dt>
    623          <dd>standard</dd>
    624          <dt>Author/Change controller:</dt>
    625          <dd>IETF</dd>
    626          <dt>Specification document:</dt>
    627          <dd>this specification (<a href="#header.field.definition" id="rfc.xref.header.field.definition.2" title="Header Field Definition">Section&nbsp;4</a>)
    628          </dd>
    629          <dt>Related information:</dt>
    630          <dd>none</dd>
    631       </dl>
    632       <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
    633       </h1>
    634       <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
    635          Nordstrom, and Mark Nottingham for their valuable feedback.
    636       </p>
     610</pre><p>Note: Those user agents that do not support the RFC 5987 encoding ignore "filename*" when it occurs after "filename".</p>
     611      </div>
     612      <div id="i18n">
     613         <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;<a href="#i18n">Internationalization Considerations</a></h1>
     614         <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
     615            in use.
     616         </p>
     617         <p id="rfc.section.6.p.2">Future parameters might also require internationalization, in which case the same encoding can be used.</p>
     618      </div>
     619      <div id="security.considerations">
     620         <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;<a href="#security.considerations">Security Considerations</a></h1>
     621         <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>.
     622         </p>
     623         <p id="rfc.section.7.p.2">Furthermore, implementers ought to be aware of the security considerations applying to HTTP (see <a href="http://tools.ietf.org/html/rfc2616#section-15">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="http://tools.ietf.org/html/rfc5987#section-5" id="rfc.xref.RFC5987.7">Section 5</a>).
     624         </p>
     625      </div>
     626      <div id="iana.considerations">
     627         <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;<a href="#iana.considerations">IANA Considerations</a></h1>
     628         <div id="registry">
     629            <h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;<a href="#registry">Registry for Disposition Values and Parameters</a></h2>
     630            <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
     631               are defined in <a href="http://tools.ietf.org/html/rfc2183#section-9">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>.
     632            </p>
     633         </div>
     634         <div id="header.field.registration">
     635            <h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;<a 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         </div>
     656      </div>
     657      <div>
     658         <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
     659         </h1>
     660         <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
     661            Nordstrom, and Mark Nottingham for their valuable feedback.
     662         </p>
     663      </div>
    637664      <h1 id="rfc.references"><a id="rfc.section.10" href="#rfc.section.10">10.</a> References
    638665      </h1>
    639666      <h2 id="rfc.references.1"><a href="#rfc.section.10.1" id="rfc.section.10.1">10.1</a> Normative References
    640667      </h2>
    641       <table>       
     668      <table>
    642669         <tr>
    643670            <td class="reference"><b id="ISO-8859-1">[ISO-8859-1]</b></td>
     
    662689      <h2 id="rfc.references.2"><a href="#rfc.section.10.2" id="rfc.section.10.2">10.2</a> Informative References
    663690      </h2>
    664       <table>                 
     691      <table>
    665692         <tr>
    666693            <td class="reference"><b id="RFC2046">[RFC2046]</b></td>
     
    705732      <div class="avoidbreak">
    706733         <h1 id="rfc.authors"><a href="#rfc.authors">Author's Address</a></h1>
    707          <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="mailto:julian.reschke@greenbytes.de"><span class="email">julian.reschke@greenbytes.de</span></a></span><span class="vcardline">URI: <a href="http://greenbytes.de/tech/webdav/" class="url">http://greenbytes.de/tech/webdav/</a></span></address>
    708       </div>
    709       <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>
    710       <p id="rfc.section.A.p.1">Compared to <a href="http://tools.ietf.org/html/rfc2616#section-19.5.1">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:
    711       </p>
    712       <ul>
    713          <li>According to RFC 2616, the disposition type "attachment" only applies to content of type "application/octet-stream". This
    714             restriction has been removed, because recipients in practice do not check the content type, and it also discourages properly
    715             declaring the media type.
    716          </li>
    717          <li>RFC 2616 only allows "quoted-string" for the filename parameter. This would be an exceptional parameter syntax, and also doesn't
    718             reflect actual use.
    719          </li>
    720          <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="http://tools.ietf.org/html/rfc2183#section-2.1">Section 2.1</a>) has been re-added with a suggestion for its processing.
    721          </li>
    722          <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>.
    723          </li>
    724       </ul>
    725       <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a id="diffs.compared.to.rfc2183" href="#diffs.compared.to.rfc2183">Differences Compared to RFC 2183</a></h1>
    726       <p id="rfc.section.B.p.1"> <a href="http://tools.ietf.org/html/rfc2183#section-2">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
    727          majority of user agents do not implement these; thus, they have been omitted from this specification.
    728       </p>
    729       <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a id="alternatives" href="#alternatives">Alternative Approaches to Internationalization</a></h1>
    730       <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="http://tools.ietf.org/html/rfc2616#section-2.2">Section 2.2</a>). For the "filename" parameter, this of course is an unacceptable restriction.
    731       </p>
    732       <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
    733          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>).
    734       </p>
    735       <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
    736          to the RFC&nbsp;5987 encoding used in this specification.
    737       </p>
    738       <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>
    739       <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
    740          — see <a href="http://tools.ietf.org/html/rfc2047#section-5">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>:
    741       </p>
    742       <blockquote id="rfc.section.C.1.p.2" cite="http://tools.ietf.org/html/rfc2047#section-5">
    743          <p>An 'encoded-word' MUST NOT appear within a 'quoted-string'.</p> 
    744          <p>...</p> 
    745          <p>An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured
    746             field body except within a 'comment' or 'phrase'.
    747          </p>
    748       </blockquote>
    749       <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
    750          confused by it.
    751       </p>
    752       <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>
    753       <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="http://tools.ietf.org/html/rfc3986#section-2.1">Section 2.1</a>) sequences of characters. The character encoding being used for decoding depends on various factors, including the encoding
    754          of the referring page, the user agent's locale, its configuration, and also the actual value of the parameter.
    755       </p>
    756       <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
    757          to the user. For those user agents that do implement this, it is difficult to predict what character encoding they actually
    758          expect.
    759       </p>
    760       <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>
    761       <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
    762          to be more likely to be the correct interpretation.
    763       </p>
    764       <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>
    765       <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>
    766       <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
    767          to:
    768       </p>
    769       <p id="rfc.section.D.p.2"> </p>
    770       <ul>
    771          <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.
    772          </li>
    773          <li>Use the 'token' form of the filename parameter only when it does not contain disallowed characters (e.g., spaces); in such
    774             cases, the quoted-string form should be used.
    775          </li>
    776          <li>Avoid including the percent character followed by two hexadecimal characters (e.g., %A9) in the filename parameter, since
    777             some existing implementations consider it to be an escape character, while others will pass it through unchanged.
    778          </li>
    779          <li>Avoid including the "\" character in the quoted-string form of the filename parameter, as escaping is not implemented by some
    780             user agents, and "\" can be considered an illegal path character.
    781          </li>
    782          <li>Avoid using non-ASCII characters in the filename parameter. Although most existing implementations will decode them as ISO‑8859‑1,
    783             some will apply heuristics to detect UTF-8, and thus might fail on certain names.
    784          </li>
    785          <li>Include a "filename*" parameter where the desired filename cannot be expressed faithfully using the "filename" form. Note
    786             that legacy user agents will not process this, and will fall back to using the "filename" parameter's content.
    787          </li>
    788          <li>When a "filename*" parameter is sent, to also generate a "filename" parameter as a fallback for user agents that do not support
    789             the "filename*" form, if possible. This can be done by substituting characters with US-ASCII sequences (e.g., Unicode character
    790             point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by "ae"). Note that this may not be possible in some locales.
    791          </li>
    792          <li>When a "filename" parameter is included as a fallback (as per above), "filename" should occur first, due to parsing problems
    793             in some existing implementations.
    794          </li>
    795          <li>Use UTF-8 as the encoding of the "filename*" parameter, when present, because at least one existing implementation only implements
    796             that encoding.
    797          </li>
    798       </ul>
    799       <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
    800          of this document, &lt;<a href="http://purl.org/NET/http/content-disposition-tests">http://purl.org/NET/http/content-disposition-tests</a>&gt; provides an overview of current levels of support in various implementations.
    801       </p>
     734         <p><b>Julian F. Reschke</b><br>greenbytes GmbH<br>Hafenweg 16<br>Muenster, NW&nbsp;48155<br>Germany<br>Email: <a href="mailto:julian.reschke@greenbytes.de">julian.reschke@greenbytes.de</a><br>URI: <a href="http://greenbytes.de/tech/webdav/">http://greenbytes.de/tech/webdav/</a></p>
     735      </div>
     736      <div id="changes.from.rfc2616">
     737         <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#changes.from.rfc2616">Changes from the RFC 2616 Definition</a></h1>
     738         <p id="rfc.section.A.p.1">Compared to <a href="http://tools.ietf.org/html/rfc2616#section-19.5.1">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:
     739         </p>
     740         <ul>
     741            <li>According to RFC 2616, the disposition type "attachment" only applies to content of type "application/octet-stream". This
     742               restriction has been removed, because recipients in practice do not check the content type, and it also discourages properly
     743               declaring the media type.
     744            </li>
     745            <li>RFC 2616 only allows "quoted-string" for the filename parameter. This would be an exceptional parameter syntax, and also doesn't
     746               reflect actual use.
     747            </li>
     748            <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="http://tools.ietf.org/html/rfc2183#section-2.1">Section 2.1</a>) has been re-added with a suggestion for its processing.
     749            </li>
     750            <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>.
     751            </li>
     752         </ul>
     753      </div>
     754      <div id="diffs.compared.to.rfc2183">
     755         <h1 id="rfc.section.B"><a href="#rfc.section.B">B.</a>&nbsp;<a href="#diffs.compared.to.rfc2183">Differences Compared to RFC 2183</a></h1>
     756         <p id="rfc.section.B.p.1"><a href="http://tools.ietf.org/html/rfc2183#section-2">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
     757            majority of user agents do not implement these; thus, they have been omitted from this specification.
     758         </p>
     759      </div>
     760      <div id="alternatives">
     761         <h1 id="rfc.section.C"><a href="#rfc.section.C">C.</a>&nbsp;<a href="#alternatives">Alternative Approaches to Internationalization</a></h1>
     762         <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="http://tools.ietf.org/html/rfc2616#section-2.2">Section 2.2</a>). For the "filename" parameter, this of course is an unacceptable restriction.
     763         </p>
     764         <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
     765            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>).
     766         </p>
     767         <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
     768            to the RFC&nbsp;5987 encoding used in this specification.
     769         </p>
     770         <div id="alternatives.rfc2047">
     771            <h2 id="rfc.section.C.1"><a href="#rfc.section.C.1">C.1</a>&nbsp;<a href="#alternatives.rfc2047">RFC 2047 Encoding</a></h2>
     772            <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
     773               — see <a href="http://tools.ietf.org/html/rfc2047#section-5">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>:
     774            </p>
     775            <blockquote id="rfc.section.C.1.p.2" cite="http://tools.ietf.org/html/rfc2047#section-5">
     776               <p>An 'encoded-word' MUST NOT appear within a 'quoted-string'.</p>
     777               <p>...</p>
     778               <p>An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured
     779                  field body except within a 'comment' or 'phrase'.
     780               </p>
     781            </blockquote>
     782            <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
     783               confused by it.
     784            </p>
     785         </div>
     786         <div id="alternatives.percent">
     787            <h2 id="rfc.section.C.2"><a href="#rfc.section.C.2">C.2</a>&nbsp;<a href="#alternatives.percent">Percent Encoding</a></h2>
     788            <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="http://tools.ietf.org/html/rfc3986#section-2.1">Section 2.1</a>) sequences of characters. The character encoding being used for decoding depends on various factors, including the encoding
     789               of the referring page, the user agent's locale, its configuration, and also the actual value of the parameter.
     790            </p>
     791            <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
     792               to the user. For those user agents that do implement this, it is difficult to predict what character encoding they actually
     793               expect.
     794            </p>
     795         </div>
     796         <div id="alternatives.sniff">
     797            <h2 id="rfc.section.C.3"><a href="#rfc.section.C.3">C.3</a>&nbsp;<a href="#alternatives.sniff">Encoding Sniffing</a></h2>
     798            <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
     799               to be more likely to be the correct interpretation.
     800            </p>
     801            <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>
     802         </div>
     803      </div>
     804      <div id="advice.generating">
     805         <h1 id="rfc.section.D"><a href="#rfc.section.D">D.</a>&nbsp;<a href="#advice.generating">Advice on Generating Content-Disposition Header Fields</a></h1>
     806         <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
     807            to:
     808         </p>
     809         <p id="rfc.section.D.p.2"></p>
     810         <ul>
     811            <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.
     812            </li>
     813            <li>Use the 'token' form of the filename parameter only when it does not contain disallowed characters (e.g., spaces); in such
     814               cases, the quoted-string form should be used.
     815            </li>
     816            <li>Avoid including the percent character followed by two hexadecimal characters (e.g., %A9) in the filename parameter, since
     817               some existing implementations consider it to be an escape character, while others will pass it through unchanged.
     818            </li>
     819            <li>Avoid including the "\" character in the quoted-string form of the filename parameter, as escaping is not implemented by some
     820               user agents, and "\" can be considered an illegal path character.
     821            </li>
     822            <li>Avoid using non-ASCII characters in the filename parameter. Although most existing implementations will decode them as ISO‑8859‑1,
     823               some will apply heuristics to detect UTF-8, and thus might fail on certain names.
     824            </li>
     825            <li>Include a "filename*" parameter where the desired filename cannot be expressed faithfully using the "filename" form. Note
     826               that legacy user agents will not process this, and will fall back to using the "filename" parameter's content.
     827            </li>
     828            <li>When a "filename*" parameter is sent, to also generate a "filename" parameter as a fallback for user agents that do not support
     829               the "filename*" form, if possible. This can be done by substituting characters with US-ASCII sequences (e.g., Unicode character
     830               point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by "ae"). Note that this may not be possible in some locales.
     831            </li>
     832            <li>When a "filename" parameter is included as a fallback (as per above), "filename" should occur first, due to parsing problems
     833               in some existing implementations.
     834            </li>
     835            <li>Use UTF-8 as the encoding of the "filename*" parameter, when present, because at least one existing implementation only implements
     836               that encoding.
     837            </li>
     838         </ul>
     839         <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
     840            of this document, &lt;<a href="http://purl.org/NET/http/content-disposition-tests">http://purl.org/NET/http/content-disposition-tests</a>&gt; provides an overview of current levels of support in various implementations.
     841         </p>
     842      </div>
    802843   </body>
    803844</html>
Note: See TracChangeset for help on using the changeset viewer.