source: draft-ietf-httpbis-content-disp/latest/draft-ietf-httpbis-content-disp.xml @ 1004

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

reorder BCP/STD/RFC numbers in references

  • Property svn:executable set to *
File size: 30.3 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-latest" 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"/>
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  When both "filename" and "filename*" are present, a recipient &SHOULD; pick
185  "filename*" and ignore "filename" - this will make it possible to send the
186  same header value to clients that do not support "filename*".
187</t>
188<t>
189  It is essential that user agents treat the specified filename as advisory
190  only, thus be very careful in extracting the desired information.
191  In particular:
192  <list style="symbols">
193    <x:lt><t>
194      When the value contains path separator characters, all but the last
195      segment &SHOULD; be ignored. This prevents unintentional overwriting
196      of well-known file system location (such as "/etc/passwd").
197    </t></x:lt>
198    <x:lt><t>
199      Many platforms do not use Internet Media Types (<xref target="RFC2046"/>)
200      to hold type information in the file system, but rely on filename
201      extensions instead. Trusting the server-provided file extension could
202      introduce a privilege escalation when later on the file is opened locally
203      (consider ".exe"). Thus, recipients need to ensure that a file extension
204      is used that is safe, optimally matching the media type of the received
205      payload.
206    </t></x:lt>
207    <x:lt><t>
208      Other aspects recipients need to be aware of are names that have a
209      special meaning in the filesystem or in shell commands, such as "." and "..",
210      "~", "|", and also device names.
211    </t></x:lt>
212  </list>
213</t>
214</section>
215
216<section title="Disposition Parameter: Extensions" anchor="disposition.parameter.extensions">
217<t>
218  To enable future extensions, unknown parameters &SHOULD; be ignored (see also <xref target="RFC2183" x:fmt="," x:sec="2.8"/>).
219</t>
220</section>
221
222<section title="Extensibility" anchor="extensibility">
223<t>
224  Note that <xref target="RFC2183" x:fmt="of" x:sec="9"/> defines IANA registries both
225  for disposition types and disposition parameters. This registry is
226  shared by different protocols using Content-Disposition, such as MIME and HTTP.
227  Therefore, not all registered values may make sense in the context of HTTP.
228</t>
229</section>
230
231</section> 
232
233<section title="Examples">
234
235<figure>
236<preamble>
237Direct UA to show "save as" dialog, with a filename of "example.html": 
238</preamble>
239<artwork type="example">
240Content-Disposition: Attachment; filename=example.html
241</artwork></figure>
242<figure>
243<preamble>
244Direct UA to behave as if the Content-Disposition header field wasn't present,
245but to remember the filename "example.html" for a subsequent save operation:
246</preamble>
247<artwork type="example" x:indent-with="  ">
248Content-Disposition: INLINE; FILENAME= "example.html"
249</artwork></figure>
250<figure>
251<preamble>
252Direct UA to show "save as" dialog, with a filename of "an example":
253</preamble>
254<artwork type="example">
255Content-Disposition: Attachment; Filename*=UTF-8'<x:highlight>en</x:highlight>'an<x:highlight>%20</x:highlight>example
256</artwork>
257<postamble>Note that this example uses the extended encoding defined in
258<xref target="RFC5987"/> to specify that the natural language of the filename
259is English, and also to encode the space character which is not allowed in the
260token production.
261</postamble>
262</figure>
263<figure>
264<preamble>
265Direct UA to show "save as" dialog, with a filename containing the Unicode character  U+20AC (EURO SIGN):
266</preamble>
267<artwork type="example" x:indent-with="  ">
268Content-Disposition: attachment;
269                     filename*= UTF-8''<x:highlight>%e2%82%ac</x:highlight>%20rates
270</artwork>
271<postamble>
272  Here, the encoding defined in <xref target="RFC5987"/> is also used to encode the
273  non-ISO-8859-1 character.
274</postamble>
275</figure>
276<figure>
277<preamble>
278Same as above, but adding the "filename" parameter for compatibility with
279user agents not implementing RFC 5987:
280</preamble>
281<artwork type="example" x:indent-with="  ">
282Content-Disposition: attachment;
283                     filename="EURO rates";
284                     filename*=utf-8''<x:highlight>%e2%82%ac</x:highlight>%20rates
285</artwork>
286<postamble>
287  Note: as of September 2010, those user agents that do not support the RFC 5987
288  encoding ignore "filename*" when it occurs after "filename". Unfortunately,
289  some user agents that do support RFC 5987 do pick the "filename" rather
290  than the "filename*" parameter when it occurs first; it is expected that
291  this situation is going to improve soon.
292</postamble>
293</figure>
294
295</section>
296
297<section title="Internationalization Considerations" anchor="i18n">
298<t>
299  The "filename*" parameter (<xref target="disposition.parameter.filename"/>),
300  using the encoding defined in <xref target="RFC5987"/>, allows the
301  server to transmit characters outside the ISO-8859-1 character set,
302  and also to optionally specify the language in use.
303</t>
304<t>
305  Future parameters might also require internationalization, in which case
306  the same encoding can be used.
307</t>
308</section>
309
310<section title="Security Considerations" anchor="security.considerations">
311<t>
312  Using server-supplied information for constructing local filenames introduces
313  many risks. These are summarized in <xref target="disposition.parameter.filename"/>.
314</t>
315<t>
316  Furthermore, implementers also ought to be aware of the Security
317  Considerations applying to HTTP (see <xref target="RFC2616" x:fmt="of" x:sec="15"/>), and also the parameter encoding defined in <xref target="RFC5987"/>
318  (see <xref target="RFC5987" x:fmt="sec" x:sec="5"/>).
319</t>
320</section> 
321
322<section title="IANA Considerations" anchor="iana.considerations">
323
324<section title="Registry for Disposition Values and Parameter" anchor="registry">
325<t>
326  This specification does not introduce any changes to the registration
327  procedures for disposition values and parameters that are defined in
328  <xref target="RFC2183" x:fmt="of" x:sec="9"/>.
329</t>
330
331</section>
332
333<section title="Header Field Registration" anchor="header.field.registration"> 
334<t>
335  This document updates the definition of the Content-Disposition HTTP header field
336  in the permanent HTTP header field registry (see <xref target="RFC3864"/>).
337</t>
338<t>
339<list style="hanging">
340  <t hangText="Header field name:">Content-Disposition</t>
341  <t hangText="Applicable protocol:">http</t>
342  <t hangText="Status:">standard</t>
343  <t hangText="Author/Change controller:">IETF</t>
344  <t hangText="Specification document:">this specification (<xref target="header.field.definition"/>)</t>
345</list>
346</t>
347</section>
348
349</section> 
350
351<section title="Acknowledgements">
352<t>
353  Thanks to Rolf Eike Beer, Bjoern Hoehrmann, Alfred Hoenes, Roar Lauritzsen,
354  and Henrik Nordstrom for their valuable feedback.
355</t>
356</section> 
357
358  </middle>
359  <back>
360 
361<references title="Normative References">
362 
363  <reference anchor="RFC2119">
364    <front>
365      <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
366      <author initials="S." surname="Bradner" fullname="Scott Bradner">
367        <organization>Harvard University</organization>
368        <address><email>sob@harvard.edu</email></address>
369      </author>
370      <date month="March" year="1997"/>
371      <area>General</area>
372      <keyword>keyword</keyword>
373    </front>
374    <seriesInfo name="BCP" value="14"/>
375    <seriesInfo name="RFC" value="2119"/>
376  </reference>
377
378  <reference anchor="RFC2616">
379    <front>
380      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
381      <author initials="R." surname="Fielding" fullname="R. Fielding">
382        <organization>University of California, Irvine</organization>
383        <address><email>fielding@ics.uci.edu</email></address>
384      </author>
385      <author initials="J." surname="Gettys" fullname="J. Gettys">
386        <organization>W3C</organization>
387        <address><email>jg@w3.org</email></address>
388      </author>
389      <author initials="J." surname="Mogul" fullname="J. Mogul">
390        <organization>Compaq Computer Corporation</organization>
391        <address><email>mogul@wrl.dec.com</email></address>
392      </author>
393      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
394        <organization>MIT Laboratory for Computer Science</organization>
395        <address><email>frystyk@w3.org</email></address>
396      </author>
397      <author initials="L." surname="Masinter" fullname="L. Masinter">
398        <organization>Xerox Corporation</organization>
399        <address><email>masinter@parc.xerox.com</email></address>
400      </author>
401      <author initials="P." surname="Leach" fullname="P. Leach">
402        <organization>Microsoft Corporation</organization>
403        <address><email>paulle@microsoft.com</email></address>
404      </author>
405      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
406        <organization>W3C</organization>
407        <address><email>timbl@w3.org</email></address>
408      </author>
409      <date month="June" year="1999"/>
410    </front>
411    <seriesInfo name="RFC" value="2616"/>
412  </reference>
413
414  <reference anchor="RFC5987">
415        <front>
416      <title abbrev="RFC2231 Encoding in HTTP">Applicability of RFC 2231
417      Encoding to Hypertext Transfer Protocol (HTTP) Headers</title>
418      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
419        <organization abbrev="greenbytes">greenbytes GmbH</organization>
420        <address>
421          <postal>
422            <street>Hafenweg 16</street>
423            <city>Muenster</city><region>NW</region><code>48155</code>
424            <country>Germany</country>
425          </postal>
426          <email>julian.reschke@greenbytes.de</email>   
427          <uri>http://greenbytes.de/tech/webdav/</uri> 
428        </address>
429      </author>
430      <date month="August" year="2010"/>
431    </front>
432    <seriesInfo name="RFC" value="5987"/>
433  </reference>
434
435
436  <reference anchor="ISO-8859-1">
437    <front>
438      <title>Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1</title>
439      <author>
440        <organization>International Organization for Standardization</organization>
441      </author>
442      <date year="1998"/>
443    </front>
444    <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
445  </reference>
446
447</references>
448 
449<references title="Informative References">
450
451  <reference anchor="RFC2046">
452    <front>
453      <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
454      <author initials="N." surname="Freed" fullname="Ned Freed">
455        <organization>Innosoft International, Inc.</organization>
456        <address><email>ned@innosoft.com</email></address>
457      </author>
458      <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
459        <organization>First Virtual Holdings</organization>
460        <address><email>nsb@nsb.fv.com</email></address>
461      </author>
462      <date month="November" year="1996"/>
463    </front>
464    <seriesInfo name="RFC" value="2046"/>
465  </reference>
466
467  <reference anchor="RFC2047">
468    <front>
469      <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
470      <author initials="K." surname="Moore" fullname="Keith Moore">
471        <organization>University of Tennessee</organization>
472        <address><email>moore@cs.utk.edu</email></address>
473      </author>
474      <date month="November" year="1996"/>
475    </front>
476    <seriesInfo name="RFC" value="2047"/>
477  </reference>
478
479  <reference anchor="RFC2183">
480    <front>
481      <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</title>
482      <author initials="R." surname="Troost" fullname="Rens Troost">
483        <organization>New Century Systems</organization>
484        <address><email>rens@century.com</email></address>
485      </author>
486      <author initials="S." surname="Dorner" fullname="Steve Dorner">
487        <organization>QUALCOMM Incorporated</organization>
488        <address><email>sdorner@qualcomm.com</email></address>
489      </author>
490      <author initials="K." surname="Moore" fullname="Keith Moore">
491        <organization>Department of Computer Science</organization>
492        <address><email>moore@cs.utk.edu</email></address>
493      </author>
494      <date year="1997" month="August"/>
495    </front>
496    <seriesInfo name="RFC" value="2183"/>
497  </reference>
498
499  <reference anchor="RFC2231">
500    <front>
501      <title abbrev="MIME Value and Encoded Word Extensions">MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations</title>
502      <author initials="N." surname="Freed" fullname="Ned Freed">
503        <organization abbrev="Innosoft">Innosoft International, Inc.</organization>
504        <address><email>ned.freed@innosoft.com</email></address>
505      </author>
506      <author initials="K." surname="Moore" fullname="Keith Moore">
507        <organization>University of Tennessee</organization>
508        <address><email>moore@cs.utk.edu</email></address>
509      </author>
510      <date year="1997" month="November"/>
511    </front>
512    <seriesInfo name="RFC" value="2231"/>
513  </reference>
514
515  <reference anchor="RFC3629">
516    <front>
517      <title>UTF-8, a transformation format of ISO 10646</title>
518      <author initials="F." surname="Yergeau" fullname="F. Yergeau">
519        <organization>Alis Technologies</organization>
520        <address><email>fyergeau@alis.com</email></address>
521      </author>
522      <date month="November" year="2003"/>
523    </front>
524    <seriesInfo name="STD" value="63"/>
525    <seriesInfo name="RFC" value="3629"/>
526  </reference>
527
528  <reference anchor="RFC3864">
529    <front>
530      <title>Registration Procedures for Message Header Fields</title>
531      <author initials="G." surname="Klyne" fullname="G. Klyne">
532        <organization>Nine by Nine</organization>
533        <address><email>GK-IETF@ninebynine.org</email></address>
534      </author>
535      <author initials="M." surname="Nottingham" fullname="M. Nottingham">
536        <organization>BEA Systems</organization>
537        <address><email>mnot@pobox.com</email></address>
538      </author>
539      <author initials="J." surname="Mogul" fullname="J. Mogul">
540        <organization>HP Labs</organization>
541        <address><email>JeffMogul@acm.org</email></address>
542      </author>
543      <date year="2004" month="September"/>
544    </front>
545    <seriesInfo name="BCP" value="90"/>
546    <seriesInfo name="RFC" value="3864"/>
547  </reference>
548
549  <reference anchor="RFC3986">
550   <front>
551    <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
552    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
553      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
554      <address>
555         <email>timbl@w3.org</email>
556         <uri>http://www.w3.org/People/Berners-Lee/</uri>
557      </address>
558    </author>
559    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
560      <organization abbrev="Day Software">Day Software</organization>
561      <address>
562        <email>fielding@gbiv.com</email>
563        <uri>http://roy.gbiv.com/</uri>
564      </address>
565    </author>
566    <author initials="L." surname="Masinter" fullname="Larry Masinter">
567      <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
568      <address>
569        <email>LMM@acm.org</email>
570        <uri>http://larry.masinter.net/</uri>
571      </address>
572    </author>
573    <date month="January" year="2005"/>
574   </front>
575   <seriesInfo name="STD" value="66"/>
576   <seriesInfo name="RFC" value="3986"/>
577  </reference>
578
579</references>
580
581<section title="Changes from the RFC 2616 Definition" anchor="changes.from.rfc2616">
582<t>
583  Compared to <xref target="RFC2616" x:fmt="of" x:sec="19.5.1"/>, the following
584  normative changes reflecting actual implementations have been made:
585<list style="symbols">
586  <t>
587    According to RFC 2616, the disposition type "attachment" only applies to
588    content of type "application/octet-stream". This restriction has been
589    removed, because user agents in practice do not check the content type, and
590    it also discourages properly declaring the media type.
591  </t>
592
593  <t>
594    RFC 2616 only allows "quoted-string" for the filename parameter. This
595    would be an exceptional parameter syntax, and also doesn't reflect actual
596    use.
597  </t>
598
599  <t>
600    The definition for the disposition type "inline" (<xref target="RFC2183" x:fmt="," x:sec="2.1"/>)
601    has been re-added with a suggestion for its processing.
602  </t>
603  <t>
604    This specification requires support for the extended parameter encoding
605    defined in <xref target="RFC5987"/>.
606  </t>
607</list>
608</t>
609</section>
610
611<section title="Differences compared to RFC 2183" anchor="diffs.compared.to.rfc2183">
612<t>
613  <xref target="RFC2183" x:fmt="of" x:sec="2"/> defines several additional
614  disposition parameters: "creation-date", "modification-date",
615  "quoted-date-time", and "size". These do not appear to be implemented by
616  any user agent, thus have been omitted from this specification.
617</t>
618</section>
619
620<section title="Alternative Approaches to Internationalization" anchor="alternatives">
621<t>
622  By default, HTTP header field parameters cannot carry characters outside
623  the ISO-8859-1 (<xref target="ISO-8859-1"/>) character encoding (see
624  <xref target="RFC2616" x:fmt="," x:sec="2.2"/>). For the "filename"
625  parameter, this of course is an unacceptable restriction.
626</t>
627<t>
628  Unfortunately, user agent implementers have not managed to come up with
629  an interoperable approach, although the IETF Standards Track specifies
630  exactly one solution (<xref target="RFC2231"/>, clarified and profiled for
631  HTTP in <xref target="RFC5987"/>).
632</t>
633<t>
634  For completeness, the sections below describe the various approaches that
635  have been tried, and explains how they are inferior to the RFC 5987
636  encoding used in this specification.
637</t>
638
639<section title="RFC 2047 Encoding" anchor="alternatives.rfc2047">
640<t>
641  RFC 2047 defines an encoding mechanism for
642  header fields, but this encoding is not supposed to be used for
643  header field parameters - see <xref target="RFC2047" x:fmt="of" x:sec="5"/>: 
644</t>
645<x:blockquote cite="http://tools.ietf.org/html/rfc2047#section-5">
646  <t>
647    An 'encoded-word' MUST NOT appear within a 'quoted-string'.
648  </t>
649  <t>
650    ...
651  </t>
652  <t>
653    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'.
654  </t>
655</x:blockquote>
656<t>
657  In practice, some user agents implement the encoding, some do not
658  (exposing the encoded string to the user), and some get confused by it.
659</t>
660</section>
661
662<section title="Percent Encoding" anchor="alternatives.percent">
663<t>
664  Some user agents accept percent encoded (<xref target="RFC3986" x:fmt="," x:sec="2.1"/>)
665  sequences of characters encoded using the UTF-8 (<xref target="RFC3629"/>) character encoding.
666</t>
667<t>
668  In practice, this is hard to use because those user agents
669  that do not support it will display the escaped character sequence to the user.
670</t>
671<t>
672  Furthermore, the first user agent to implement this did choose the encoding
673  based on local settings; thus making it very hard to use in multi-lingual
674  environments.
675</t>
676</section>
677
678<section title="Encoding Sniffing" anchor="alternatives.sniff">
679<t>
680  Some user agents inspect the value (which defaults to ISO-8859-1) and
681  switch to UTF-8 when it seems to be more likely to be the correct
682  interpretation.
683</t>
684<t>
685  As with the approaches above, this is not interoperable and furthermore
686  risks misinterpreting the actual value.
687</t>
688</section>
689
690<section title="Implementations" anchor="alternatives.implementations">
691<t>
692  Unfortunately, as of September 2010, neither the encoding defined in RFCs 2231
693  and 5789, nor any of the alternate approaches discussed above was
694  implemented interoperably. Thus, this specification recommends the approach
695  defined in RFC 5987, which at least has the advantage of actually being
696  specified properly.
697</t>
698<t>
699  The table below shows the implementation support for the various approaches:
700  <cref anchor="impls">Discuss: should we mention the implementation status
701  of actual UAs in a RFC? Up to the IESG to decide...</cref> 
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.