source: draft-ietf-httpbis-content-disp/01/draft-ietf-httpbis-content-disp.xml @ 2726

Last change on this file since 2726 was 1500, checked in by julian.reschke@…, 11 years ago

fix mime types

  • Property svn:executable set to *
  • Property svn:mime-type set to text/xml
File size: 30.5 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../../draft-ietf-httpbis/myxml2rfc.xslt' ?>
3<?rfc toc="yes"?>
4<?rfc symrefs="yes"?>
5<?rfc sortrefs="yes"?>
6<?rfc compact="yes"?>
7<?rfc comments="yes"?>
8<?rfc inline="yes"?>
9<?rfc subcompact="no"?>
10<?rfc rfcedstyle="yes"?>
11<?rfc-ext allow-markup-in-artwork="yes" ?>
12<?rfc-ext include-references-in-index="yes" ?>
13
14<!DOCTYPE rfc [
15  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
16  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
17  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
18  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
19  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
20  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
21  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
22  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
23  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
24  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
25]>
26
27<rfc xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:ed="http://greenbytes.de/2002/rfcedit" ipr="trust200902" docName="draft-ietf-httpbis-content-disp-01" category="std" x:maturity-level="proposed" xml:lang="en" updates="2616">
28        <front>
29  <title abbrev="Content-Disposition in HTTP">Use of the Content-Disposition&#160;Header&#160;Field
30  in the Hypertext&#160;Transfer&#160;Protocol&#160;(HTTP)</title>
31  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
32    <organization abbrev="greenbytes">greenbytes GmbH</organization>
33    <address>
34      <postal>
35        <street>Hafenweg 16</street>
36        <city>Muenster</city><region>NW</region><code>48155</code>
37        <country>Germany</country>
38      </postal>
39      <email>julian.reschke@greenbytes.de</email>       
40      <uri>http://greenbytes.de/tech/webdav/</uri>     
41    </address>
42  </author>
43
44  <date month="September" year="2010" day="16"/>
45  <workgroup>HTTPbis Working Group</workgroup>
46 
47  <abstract>
48    <t>
49      HTTP/1.1 defines the Content-Disposition response header field,
50      but points out that it is not part of the HTTP/1.1 Standard.
51      This specification takes over the definition and registration of
52      Content-Disposition, as used in HTTP, and clarifies internationalization
53      aspects.
54    </t>
55  </abstract>
56 
57  <note title="Editorial Note (To be removed by RFC Editor before publication)">
58    <t>
59      This specification is expected to replace the definition of Content-Disposition
60      in the HTTP/1.1 specification, as currently revised by the IETF HTTPbis
61      working group. See also <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/123"/>.
62    </t>
63    <t>
64      Discussion of this draft should take place on the HTTPBIS working group
65      mailing list (ietf-http-wg@w3.org). The current issues list is
66      at <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/query?component=content-disp"/>
67      and related documents (including fancy diffs) can be found at
68      <eref target="http://tools.ietf.org/wg/httpbis/"/>.
69    </t>
70    <t>
71      The changes in this draft are summarized in <xref target="changes.since.00"/>.
72    </t>
73  </note>
74  </front>
75
76  <middle>
77
78<section title="Introduction" anchor="introduction">
79<t>
80  HTTP/1.1 defines the Content-Disposition response header field in <xref target="RFC2616" x:fmt="of" x:sec="19.5.1"/>,
81  but points out that it is not part of the HTTP/1.1 Standard (<xref target="RFC2616" x:fmt="sec" x:sec="15.5"/>):
82</t>
83<x:blockquote cite="http://tools.ietf.org/html/rfc2616#section-15.5">
84  <t>
85    Content-Disposition is not part of the HTTP standard, but since it is
86    widely implemented, we are documenting its use and risks for implementers.
87  </t>
88</x:blockquote>
89<t>
90  This specification takes over the definition and registration of
91  Content-Disposition, as used in HTTP.
92  Based on interoperability testing with existing User Agents,
93  it fully defines a profile of the
94  features defined in the Multipurpose Internet Mail Extensions (MIME) variant (<xref target="RFC2183"/>) of the
95  header field, and also clarifies internationalization
96  aspects.
97</t>
98</section> 
99
100<section title="Notational Conventions">
101<t>
102  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
103  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document
104  are to be interpreted as described in <xref target="RFC2119"/>.
105</t>
106<t>
107  This specification uses the augmented BNF notation defined in
108  <xref target="RFC2616" x:fmt="of" x:sec="2.1"/>, including its rules for
109  linear whitespace (LWS).
110</t>
111</section> 
112
113<section title="Header Field Definition" anchor="header.field.definition">
114  <iref item="Headers" subitem="Content-Disposition" primary="true" x:for-anchor=""/>
115  <iref item="Content-Disposition header" primary="true" x:for-anchor=""/>
116<t>
117  The Content-Disposition response header field is used to convey additional
118  information about how to process the response payload, and also can be used
119  to attach additional metadata, such as the filename.
120</t>
121
122<section title="Grammar">
123<figure><artwork type="abnf2616">
124  content-disposition = "Content-Disposition" ":"
125                         disposition-type *( ";" disposition-parm )
126
127  disposition-type    = "inline" | "attachment" | disp-ext-type
128                      ; case-insensitive
129  disp-ext-type       = token
130
131  disposition-parm    = filename-parm | disp-ext-parm
132
133  filename-parm       = "filename" "=" value
134                      | "filename*" "=" ext-value
135 
136  disp-ext-parm       = token "=" value
137                      | ext-token "=" ext-value
138  ext-token           = &lt;the characters in token, followed by "*"&gt;
139</artwork></figure>
140
141<figure>
142<preamble>Defined in <xref target="RFC2616"/>:</preamble>
143<artwork type="abnf2616">
144  token       = &lt;token, defined in <xref target="RFC2616" x:fmt="," x:sec="2.2"/>&gt;
145  value       = &lt;value, defined in <xref target="RFC2616" x:fmt="," x:sec="3.6"/>&gt;
146</artwork></figure>
147<figure>
148<preamble>Defined in <xref target="RFC5987"/>:</preamble>
149<artwork type="abnf2616">
150  ext-value   = &lt;ext-value, defined in <xref target="RFC5987" x:sec="3.2"/>&gt;
151</artwork></figure>
152</section>
153
154<section title="Disposition Type" anchor="disposition.type">
155<t>
156  If the disposition type matches "attachment" (case-insensitively), this indicates that the user agent should not display the response,
157  but directly enter a "save as..." dialog.
158</t>
159<t>
160  On the other hand, if it matches "inline" (case-insensitively), this implies default processing.
161</t>
162<t>
163  Unknown or unhandled disposition types &SHOULD; be handled the same way as "attachment"
164  (see also <xref target="RFC2183" x:fmt="," x:sec="2.8"/>).
165</t>
166</section>
167
168<section title="Disposition Parameter: 'Filename'" anchor="disposition.parameter.filename">
169<t>
170  The parameters "filename" and "filename*", to be matched case-insensitively,
171  provide information on how to construct a filename for storing the message
172  payload.
173</t>
174<t>
175  Depending on the disposition type, this information might be used right away
176  (in the "save as..." interaction caused for the "attachment" disposition type),
177  or later on (for instance, when the user decides to save the contents of the
178  current page being displayed).
179</t>
180<t>
181  The parameters "filename" and "filename*" differ only in that "filename*" uses
182  the encoding defined in <xref target="RFC5987"/>, allowing the use
183  of characters not present in the ISO-8859-1 character set (<xref target="ISO-8859-1"/>).
184</t>
185<t>
186  Many user agent implementations predating this specification
187  do not understand the "filename*" parameter. Therefore, when both "filename"
188  and "filename*" are present in a single header field value, recipients
189  &SHOULD; pick "filename*" and ignore "filename". This way, senders
190  can avoid special-casing specific user agents by sending both the
191  more expressive "filename*" parameter, and the "filename" parameter
192  as fallback for legacy recipients (see <xref target="examples"/> for
193  an example).
194</t>
195<t>
196  It is essential that user agents treat the specified filename as advisory
197  only, thus be very careful in extracting the desired information.
198  In particular:
199  <list style="symbols">
200    <x:lt><t>
201      When the value contains path separator characters, all but the last
202      segment &SHOULD; be ignored. This prevents unintentional overwriting
203      of well-known file system location (such as "/etc/passwd").
204    </t></x:lt>
205    <x:lt><t>
206      Many platforms do not use Internet Media Types (<xref target="RFC2046"/>)
207      to hold type information in the file system, but rely on filename
208      extensions instead. Trusting the server-provided file extension could
209      introduce a privilege escalation when later on the file is opened locally
210      (consider ".exe"). Thus, recipients need to ensure that a file extension
211      is used that is safe, optimally matching the media type of the received
212      payload.
213    </t></x:lt>
214    <x:lt><t>
215      Other aspects recipients need to be aware of are names that have a
216      special meaning in the file system or in shell commands, such as "." and "..",
217      "~", "|", and also device names.
218    </t></x:lt>
219  </list>
220</t>
221</section>
222
223<section title="Disposition Parameter: Extensions" anchor="disposition.parameter.extensions">
224<t>
225  To enable future extensions, unknown parameters &SHOULD; be ignored (see also <xref target="RFC2183" x:fmt="," x:sec="2.8"/>).
226</t>
227</section>
228
229<section title="Extensibility" anchor="extensibility">
230<t>
231  Note that <xref target="RFC2183" x:fmt="of" x:sec="9"/> defines IANA registries both
232  for disposition types and disposition parameters. This registry is
233  shared by different protocols using Content-Disposition, such as MIME and HTTP.
234  Therefore, not all registered values may make sense in the context of HTTP.
235</t>
236</section>
237
238</section> 
239
240<section title="Examples" anchor="examples">
241
242<figure>
243<preamble>
244Direct UA to show "save as" dialog, with a filename of "example.html": 
245</preamble>
246<artwork type="example">
247Content-Disposition: Attachment; filename=example.html
248</artwork></figure>
249<figure>
250<preamble>
251Direct UA to behave as if the Content-Disposition header field wasn't present,
252but to remember the filename "example.html" for a subsequent save operation:
253</preamble>
254<artwork type="example" x:indent-with="  ">
255Content-Disposition: INLINE; FILENAME= "example.html"
256</artwork></figure>
257<figure>
258<preamble>
259Direct UA to show "save as" dialog, with a filename of "an example":
260</preamble>
261<artwork type="example">
262Content-Disposition: Attachment; Filename*=UTF-8'<x:highlight>en</x:highlight>'an<x:highlight>%20</x:highlight>example
263</artwork>
264<postamble>Note that this example uses the extended encoding defined in
265<xref target="RFC5987"/> to specify that the natural language of the filename
266is English, and also to encode the space character which is not allowed in the
267token production.
268</postamble>
269</figure>
270<figure>
271<preamble>
272Direct UA to show "save as" dialog, with a filename containing the Unicode character  U+20AC (EURO SIGN):
273</preamble>
274<artwork type="example" x:indent-with="  ">
275Content-Disposition: attachment;
276                     filename*= UTF-8''<x:highlight>%e2%82%ac</x:highlight>%20rates
277</artwork>
278<postamble>
279  Here, the encoding defined in <xref target="RFC5987"/> is also used to encode the
280  non-ISO-8859-1 character.
281</postamble>
282</figure>
283<figure>
284<preamble>
285Same as above, but adding the "filename" parameter for compatibility with
286user agents not implementing RFC 5987:
287</preamble>
288<artwork type="example" x:indent-with="  ">
289Content-Disposition: attachment;
290                     filename="EURO rates";
291                     filename*=utf-8''<x:highlight>%e2%82%ac</x:highlight>%20rates
292</artwork>
293<postamble>
294  Note: as of September 2010, those user agents that do not support the RFC 5987
295  encoding ignore "filename*" when it occurs after "filename". Unfortunately,
296  some user agents that do support RFC 5987 do pick the "filename" rather
297  than the "filename*" parameter when it occurs first; it is expected that
298  this situation is going to improve soon.
299</postamble>
300</figure>
301
302</section>
303
304<section title="Internationalization Considerations" anchor="i18n">
305<t>
306  The "filename*" parameter (<xref target="disposition.parameter.filename"/>),
307  using the encoding defined in <xref target="RFC5987"/>, allows the
308  server to transmit characters outside the ISO-8859-1 character set,
309  and also to optionally specify the language in use.
310</t>
311<t>
312  Future parameters might also require internationalization, in which case
313  the same encoding can be used.
314</t>
315</section>
316
317<section title="Security Considerations" anchor="security.considerations">
318<t>
319  Using server-supplied information for constructing local filenames introduces
320  many risks. These are summarized in <xref target="disposition.parameter.filename"/>.
321</t>
322<t>
323  Furthermore, implementers also ought to be aware of the Security
324  Considerations applying to HTTP (see <xref target="RFC2616" x:fmt="of" x:sec="15"/>), and also the parameter encoding defined in <xref target="RFC5987"/>
325  (see <xref target="RFC5987" x:fmt="sec" x:sec="5"/>).
326</t>
327</section> 
328
329<section title="IANA Considerations" anchor="iana.considerations">
330
331<section title="Registry for Disposition Values and Parameter" anchor="registry">
332<t>
333  This specification does not introduce any changes to the registration
334  procedures for disposition values and parameters that are defined in
335  <xref target="RFC2183" x:fmt="of" x:sec="9"/>.
336</t>
337</section>
338
339<section title="Header Field Registration" anchor="header.field.registration"> 
340<t>
341  This document updates the definition of the Content-Disposition HTTP header field
342  in the permanent HTTP header field registry (see <xref target="RFC3864"/>).
343</t>
344<t>
345<list style="hanging">
346  <t hangText="Header field name:">Content-Disposition</t>
347  <t hangText="Applicable protocol:">http</t>
348  <t hangText="Status:">standard</t>
349  <t hangText="Author/Change controller:">IETF</t>
350  <t hangText="Specification document:">this specification (<xref target="header.field.definition"/>)</t>
351</list>
352</t>
353</section>
354
355</section> 
356
357<section title="Acknowledgements">
358<t>
359  Thanks to Rolf Eike Beer, Bjoern Hoehrmann, Alfred Hoenes, Roar Lauritzsen,
360  and Henrik Nordstrom for their valuable feedback.
361</t>
362</section> 
363
364  </middle>
365  <back>
366 
367<references title="Normative References">
368 
369  <reference anchor="RFC2119">
370    <front>
371      <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
372      <author initials="S." surname="Bradner" fullname="Scott Bradner">
373        <organization>Harvard University</organization>
374        <address><email>sob@harvard.edu</email></address>
375      </author>
376      <date month="March" year="1997"/>
377      <area>General</area>
378      <keyword>keyword</keyword>
379    </front>
380    <seriesInfo name="BCP" value="14"/>
381    <seriesInfo name="RFC" value="2119"/>
382  </reference>
383
384  <reference anchor="RFC2616">
385    <front>
386      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
387      <author initials="R." surname="Fielding" fullname="R. Fielding">
388        <organization>University of California, Irvine</organization>
389        <address><email>fielding@ics.uci.edu</email></address>
390      </author>
391      <author initials="J." surname="Gettys" fullname="J. Gettys">
392        <organization>W3C</organization>
393        <address><email>jg@w3.org</email></address>
394      </author>
395      <author initials="J." surname="Mogul" fullname="J. Mogul">
396        <organization>Compaq Computer Corporation</organization>
397        <address><email>mogul@wrl.dec.com</email></address>
398      </author>
399      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
400        <organization>MIT Laboratory for Computer Science</organization>
401        <address><email>frystyk@w3.org</email></address>
402      </author>
403      <author initials="L." surname="Masinter" fullname="L. Masinter">
404        <organization>Xerox Corporation</organization>
405        <address><email>masinter@parc.xerox.com</email></address>
406      </author>
407      <author initials="P." surname="Leach" fullname="P. Leach">
408        <organization>Microsoft Corporation</organization>
409        <address><email>paulle@microsoft.com</email></address>
410      </author>
411      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
412        <organization>W3C</organization>
413        <address><email>timbl@w3.org</email></address>
414      </author>
415      <date month="June" year="1999"/>
416    </front>
417    <seriesInfo name="RFC" value="2616"/>
418  </reference>
419
420  <reference anchor="RFC5987">
421        <front>
422      <title>Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters</title>
423      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
424        <organization abbrev="greenbytes">greenbytes GmbH</organization>
425        <address>
426          <postal>
427            <street>Hafenweg 16</street>
428            <city>Muenster</city><region>NW</region><code>48155</code>
429            <country>Germany</country>
430          </postal>
431          <email>julian.reschke@greenbytes.de</email>   
432          <uri>http://greenbytes.de/tech/webdav/</uri> 
433        </address>
434      </author>
435      <date month="August" year="2010"/>
436    </front>
437    <seriesInfo name="RFC" value="5987"/>
438  </reference>
439
440  <reference anchor="ISO-8859-1">
441    <front>
442      <title>Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1</title>
443      <author>
444        <organization>International Organization for Standardization</organization>
445      </author>
446      <date year="1998"/>
447    </front>
448    <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
449  </reference>
450
451</references>
452 
453<references title="Informative References">
454
455  <reference anchor="RFC2046">
456    <front>
457      <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
458      <author initials="N." surname="Freed" fullname="Ned Freed">
459        <organization>Innosoft International, Inc.</organization>
460        <address><email>ned@innosoft.com</email></address>
461      </author>
462      <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
463        <organization>First Virtual Holdings</organization>
464        <address><email>nsb@nsb.fv.com</email></address>
465      </author>
466      <date month="November" year="1996"/>
467    </front>
468    <seriesInfo name="RFC" value="2046"/>
469  </reference>
470
471  <reference anchor="RFC2047">
472    <front>
473      <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
474      <author initials="K." surname="Moore" fullname="Keith Moore">
475        <organization>University of Tennessee</organization>
476        <address><email>moore@cs.utk.edu</email></address>
477      </author>
478      <date month="November" year="1996"/>
479    </front>
480    <seriesInfo name="RFC" value="2047"/>
481  </reference>
482
483  <reference anchor="RFC2183">
484    <front>
485      <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</title>
486      <author initials="R." surname="Troost" fullname="Rens Troost">
487        <organization>New Century Systems</organization>
488        <address><email>rens@century.com</email></address>
489      </author>
490      <author initials="S." surname="Dorner" fullname="Steve Dorner">
491        <organization>QUALCOMM Incorporated</organization>
492        <address><email>sdorner@qualcomm.com</email></address>
493      </author>
494      <author initials="K." surname="Moore" fullname="Keith Moore">
495        <organization>Department of Computer Science</organization>
496        <address><email>moore@cs.utk.edu</email></address>
497      </author>
498      <date year="1997" month="August"/>
499    </front>
500    <seriesInfo name="RFC" value="2183"/>
501  </reference>
502
503  <reference anchor="RFC2231">
504    <front>
505      <title abbrev="MIME Value and Encoded Word Extensions">MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations</title>
506      <author initials="N." surname="Freed" fullname="Ned Freed">
507        <organization abbrev="Innosoft">Innosoft International, Inc.</organization>
508        <address><email>ned.freed@innosoft.com</email></address>
509      </author>
510      <author initials="K." surname="Moore" fullname="Keith Moore">
511        <organization>University of Tennessee</organization>
512        <address><email>moore@cs.utk.edu</email></address>
513      </author>
514      <date year="1997" month="November"/>
515    </front>
516    <seriesInfo name="RFC" value="2231"/>
517  </reference>
518
519  <reference anchor="RFC3629">
520    <front>
521      <title>UTF-8, a transformation format of ISO 10646</title>
522      <author initials="F." surname="Yergeau" fullname="F. Yergeau">
523        <organization>Alis Technologies</organization>
524        <address><email>fyergeau@alis.com</email></address>
525      </author>
526      <date month="November" year="2003"/>
527    </front>
528    <seriesInfo name="STD" value="63"/>
529    <seriesInfo name="RFC" value="3629"/>
530  </reference>
531
532  <reference anchor="RFC3864">
533    <front>
534      <title>Registration Procedures for Message Header Fields</title>
535      <author initials="G." surname="Klyne" fullname="G. Klyne">
536        <organization>Nine by Nine</organization>
537        <address><email>GK-IETF@ninebynine.org</email></address>
538      </author>
539      <author initials="M." surname="Nottingham" fullname="M. Nottingham">
540        <organization>BEA Systems</organization>
541        <address><email>mnot@pobox.com</email></address>
542      </author>
543      <author initials="J." surname="Mogul" fullname="J. Mogul">
544        <organization>HP Labs</organization>
545        <address><email>JeffMogul@acm.org</email></address>
546      </author>
547      <date year="2004" month="September"/>
548    </front>
549    <seriesInfo name="BCP" value="90"/>
550    <seriesInfo name="RFC" value="3864"/>
551  </reference>
552
553  <reference anchor="RFC3986">
554   <front>
555    <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
556    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
557      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
558      <address>
559         <email>timbl@w3.org</email>
560         <uri>http://www.w3.org/People/Berners-Lee/</uri>
561      </address>
562    </author>
563    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
564      <organization abbrev="Day Software">Day Software</organization>
565      <address>
566        <email>fielding@gbiv.com</email>
567        <uri>http://roy.gbiv.com/</uri>
568      </address>
569    </author>
570    <author initials="L." surname="Masinter" fullname="Larry Masinter">
571      <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
572      <address>
573        <email>LMM@acm.org</email>
574        <uri>http://larry.masinter.net/</uri>
575      </address>
576    </author>
577    <date month="January" year="2005"/>
578   </front>
579   <seriesInfo name="STD" value="66"/>
580   <seriesInfo name="RFC" value="3986"/>
581  </reference>
582
583</references>
584
585<section title="Changes from the RFC 2616 Definition" anchor="changes.from.rfc2616">
586<t>
587  Compared to <xref target="RFC2616" x:fmt="of" x:sec="19.5.1"/>, the following
588  normative changes reflecting actual implementations have been made:
589<list style="symbols">
590  <t>
591    According to RFC 2616, the disposition type "attachment" only applies to
592    content of type "application/octet-stream". This restriction has been
593    removed, because user agents in practice do not check the content type, and
594    it also discourages properly declaring the media type.
595  </t>
596  <t>
597    RFC 2616 only allows "quoted-string" for the filename parameter. This
598    would be an exceptional parameter syntax, and also doesn't reflect actual
599    use.
600  </t>
601  <t>
602    The definition for the disposition type "inline" (<xref target="RFC2183" x:fmt="," x:sec="2.1"/>)
603    has been re-added with a suggestion for its processing.
604  </t>
605  <t>
606    This specification requires support for the extended parameter encoding
607    defined in <xref target="RFC5987"/>.
608  </t>
609</list>
610</t>
611</section>
612
613<section title="Differences compared to RFC 2183" anchor="diffs.compared.to.rfc2183">
614<t>
615  <xref target="RFC2183" x:fmt="of" x:sec="2"/> defines several additional
616  disposition parameters: "creation-date", "modification-date",
617  "quoted-date-time", and "size". These do not appear to be implemented by
618  any user agent, thus have been omitted from this specification.
619</t>
620</section>
621
622<section title="Alternative Approaches to Internationalization" anchor="alternatives">
623<t>
624  By default, HTTP header field parameters cannot carry characters outside
625  the ISO-8859-1 (<xref target="ISO-8859-1"/>) character encoding (see
626  <xref target="RFC2616" x:fmt="," x:sec="2.2"/>). For the "filename"
627  parameter, this of course is an unacceptable restriction.
628</t>
629<t>
630  Unfortunately, user agent implementers have not managed to come up with
631  an interoperable approach, although the IETF Standards Track specifies
632  exactly one solution (<xref target="RFC2231"/>, clarified and profiled for
633  HTTP in <xref target="RFC5987"/>).
634</t>
635<t>
636  For completeness, the sections below describe the various approaches that
637  have been tried, and explains how they are inferior to the RFC 5987
638  encoding used in this specification.
639</t>
640
641<section title="RFC 2047 Encoding" anchor="alternatives.rfc2047">
642<t>
643  RFC 2047 defines an encoding mechanism for
644  header fields, but this encoding is not supposed to be used for
645  header field parameters - see <xref target="RFC2047" x:fmt="of" x:sec="5"/>: 
646</t>
647<x:blockquote cite="http://tools.ietf.org/html/rfc2047#section-5">
648  <t>
649    An 'encoded-word' MUST NOT appear within a 'quoted-string'.
650  </t>
651  <t>
652    ...
653  </t>
654  <t>
655    An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured field body except within a 'comment' or 'phrase'.
656  </t>
657</x:blockquote>
658<t>
659  In practice, some user agents implement the encoding, some do not
660  (exposing the encoded string to the user), and some get confused by it.
661</t>
662</section>
663
664<section title="Percent Encoding" anchor="alternatives.percent">
665<t>
666  Some user agents accept percent encoded (<xref target="RFC3986" x:fmt="," x:sec="2.1"/>)
667  sequences of characters encoded using the UTF-8 (<xref target="RFC3629"/>) character encoding.
668</t>
669<t>
670  In practice, this is hard to use because those user agents
671  that do not support it will display the escaped character sequence to the user.
672</t>
673<t>
674  Furthermore, the first user agent to implement this did choose the encoding
675  based on local settings; thus making it very hard to use in multi-lingual
676  environments.
677</t>
678</section>
679
680<section title="Encoding Sniffing" anchor="alternatives.sniff">
681<t>
682  Some user agents inspect the value (which defaults to ISO-8859-1) and
683  switch to UTF-8 when it seems to be more likely to be the correct
684  interpretation.
685</t>
686<t>
687  As with the approaches above, this is not interoperable and furthermore
688  risks misinterpreting the actual value.
689</t>
690</section>
691
692<section title="Implementations (to be removed by RFC Editor before publication)" anchor="alternatives.implementations">
693<t>
694  Unfortunately, as of September 2010, neither the encoding defined in RFCs 2231
695  and 5987, nor any of the alternate approaches discussed above was
696  implemented interoperably. Thus, this specification recommends the approach
697  defined in RFC 5987, which at least has the advantage of actually being
698  specified properly.
699</t>
700<t>
701  The table below shows the implementation support for the various approaches:
702</t>
703<texttable align="left">
704  <ttcol>User Agent</ttcol>
705  <ttcol>RFC 2231/5987</ttcol>
706  <ttcol>RFC 2047</ttcol>
707  <ttcol>Percent Encoding</ttcol>
708  <ttcol>Encoding Sniffing</ttcol>
709 
710  <c>Chrome</c>
711  <c>no</c>
712  <c>yes</c>
713  <c>yes</c>
714  <c>yes</c>
715
716  <c>Firefox</c>
717  <c>yes (*)</c>
718  <c>yes</c>
719  <c>no</c>
720  <c>yes</c>
721
722  <c>Internet Explorer</c>
723  <c>no</c>
724  <c>no</c>
725  <c>yes</c>
726  <c>no</c>
727
728  <c>Konqueror</c>
729  <c>yes</c>
730  <c>no</c>
731  <c>no</c>
732  <c>no</c>
733
734  <c>Opera</c>
735  <c>yes (*)</c>
736  <c>no</c>
737  <c>no</c>
738  <c>no</c>
739
740  <c>Safari</c>
741  <c>no</c>
742  <c>no</c>
743  <c>no</c>
744  <c>yes</c>
745 
746  <postamble>
747  (*) Does not implement the fallback behavior to "filename" described in
748  <xref target="disposition.parameter.filename"/>.
749  </postamble>
750
751</texttable>
752
753</section>
754
755</section>
756
757
758<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
759<section title="Since draft-reschke-rfc2183-in-http-00">
760<t> 
761  Adjust terminology ("header" -&gt; "header field").
762  Update rfc2231-in-http reference.
763</t>
764</section>
765
766
767<section title="Since draft-reschke-rfc2183-in-http-01">
768<t> 
769  Update rfc2231-in-http reference. Actually define the "filename"
770  parameter. Add internationalization considerations.
771  Add examples using the RFC 5987 encoding.
772  Add overview over other approaches, plus a table reporting
773  implementation status.
774  Add and resolve issue "nodep2183".
775  Add issues "asciivsiso",
776  "deplboth", "quoted", and "registry".
777</t>
778</section>
779
780<section title="Since draft-reschke-rfc2183-in-http-02">
781<t>
782  Add and close issue "docfallback".
783  Close issues "asciivsiso", "deplboth", "quoted", and
784  "registry".
785</t>
786</section>
787
788<section title="Since draft-reschke-rfc2183-in-http-03">
789<t>
790  Updated to be a Working Draft of the IETF HTTPbis Working Group.
791</t>
792</section>
793
794<section title="Since draft-ietf-httpbis-content-disp-00" anchor="changes.since.00">
795<t>
796  Closed issues:
797  <list style="symbols">
798    <t>
799      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/242"/>:
800      "handling of unknown disposition types"
801    </t>
802  </list>
803</t>
804<t>
805  Slightly updated the notes about the proposed fallback behavior.
806</t>
807</section>
808</section>
809
810
811  </back>
812
813</rfc>
Note: See TracBrowser for help on using the repository browser.