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

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

remove surplus whitespace in XML source

  • Property svn:executable set to *
File size: 30.1 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 field 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</section>
331
332<section title="Header Field Registration" anchor="header.field.registration"> 
333<t>
334  This document updates the definition of the Content-Disposition HTTP header field
335  in the permanent HTTP header field registry (see <xref target="RFC3864"/>).
336</t>
337<t>
338<list style="hanging">
339  <t hangText="Header field name:">Content-Disposition</t>
340  <t hangText="Applicable protocol:">http</t>
341  <t hangText="Status:">standard</t>
342  <t hangText="Author/Change controller:">IETF</t>
343  <t hangText="Specification document:">this specification (<xref target="header.field.definition"/>)</t>
344</list>
345</t>
346</section>
347
348</section> 
349
350<section title="Acknowledgements">
351<t>
352  Thanks to Rolf Eike Beer, Bjoern Hoehrmann, Alfred Hoenes, Roar Lauritzsen,
353  and Henrik Nordstrom for their valuable feedback.
354</t>
355</section> 
356
357  </middle>
358  <back>
359 
360<references title="Normative References">
361 
362  <reference anchor="RFC2119">
363    <front>
364      <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
365      <author initials="S." surname="Bradner" fullname="Scott Bradner">
366        <organization>Harvard University</organization>
367        <address><email>sob@harvard.edu</email></address>
368      </author>
369      <date month="March" year="1997"/>
370      <area>General</area>
371      <keyword>keyword</keyword>
372    </front>
373    <seriesInfo name="BCP" value="14"/>
374    <seriesInfo name="RFC" value="2119"/>
375  </reference>
376
377  <reference anchor="RFC2616">
378    <front>
379      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
380      <author initials="R." surname="Fielding" fullname="R. Fielding">
381        <organization>University of California, Irvine</organization>
382        <address><email>fielding@ics.uci.edu</email></address>
383      </author>
384      <author initials="J." surname="Gettys" fullname="J. Gettys">
385        <organization>W3C</organization>
386        <address><email>jg@w3.org</email></address>
387      </author>
388      <author initials="J." surname="Mogul" fullname="J. Mogul">
389        <organization>Compaq Computer Corporation</organization>
390        <address><email>mogul@wrl.dec.com</email></address>
391      </author>
392      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
393        <organization>MIT Laboratory for Computer Science</organization>
394        <address><email>frystyk@w3.org</email></address>
395      </author>
396      <author initials="L." surname="Masinter" fullname="L. Masinter">
397        <organization>Xerox Corporation</organization>
398        <address><email>masinter@parc.xerox.com</email></address>
399      </author>
400      <author initials="P." surname="Leach" fullname="P. Leach">
401        <organization>Microsoft Corporation</organization>
402        <address><email>paulle@microsoft.com</email></address>
403      </author>
404      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
405        <organization>W3C</organization>
406        <address><email>timbl@w3.org</email></address>
407      </author>
408      <date month="June" year="1999"/>
409    </front>
410    <seriesInfo name="RFC" value="2616"/>
411  </reference>
412
413  <reference anchor="RFC5987">
414        <front>
415      <title>Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters</title>
416      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
417        <organization abbrev="greenbytes">greenbytes GmbH</organization>
418        <address>
419          <postal>
420            <street>Hafenweg 16</street>
421            <city>Muenster</city><region>NW</region><code>48155</code>
422            <country>Germany</country>
423          </postal>
424          <email>julian.reschke@greenbytes.de</email>   
425          <uri>http://greenbytes.de/tech/webdav/</uri> 
426        </address>
427      </author>
428      <date month="August" year="2010"/>
429    </front>
430    <seriesInfo name="RFC" value="5987"/>
431  </reference>
432
433  <reference anchor="ISO-8859-1">
434    <front>
435      <title>Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1</title>
436      <author>
437        <organization>International Organization for Standardization</organization>
438      </author>
439      <date year="1998"/>
440    </front>
441    <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
442  </reference>
443
444</references>
445 
446<references title="Informative References">
447
448  <reference anchor="RFC2046">
449    <front>
450      <title abbrev="Media Types">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
451      <author initials="N." surname="Freed" fullname="Ned Freed">
452        <organization>Innosoft International, Inc.</organization>
453        <address><email>ned@innosoft.com</email></address>
454      </author>
455      <author initials="N." surname="Borenstein" fullname="Nathaniel S. Borenstein">
456        <organization>First Virtual Holdings</organization>
457        <address><email>nsb@nsb.fv.com</email></address>
458      </author>
459      <date month="November" year="1996"/>
460    </front>
461    <seriesInfo name="RFC" value="2046"/>
462  </reference>
463
464  <reference anchor="RFC2047">
465    <front>
466      <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
467      <author initials="K." surname="Moore" fullname="Keith Moore">
468        <organization>University of Tennessee</organization>
469        <address><email>moore@cs.utk.edu</email></address>
470      </author>
471      <date month="November" year="1996"/>
472    </front>
473    <seriesInfo name="RFC" value="2047"/>
474  </reference>
475
476  <reference anchor="RFC2183">
477    <front>
478      <title abbrev="Content-Disposition">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</title>
479      <author initials="R." surname="Troost" fullname="Rens Troost">
480        <organization>New Century Systems</organization>
481        <address><email>rens@century.com</email></address>
482      </author>
483      <author initials="S." surname="Dorner" fullname="Steve Dorner">
484        <organization>QUALCOMM Incorporated</organization>
485        <address><email>sdorner@qualcomm.com</email></address>
486      </author>
487      <author initials="K." surname="Moore" fullname="Keith Moore">
488        <organization>Department of Computer Science</organization>
489        <address><email>moore@cs.utk.edu</email></address>
490      </author>
491      <date year="1997" month="August"/>
492    </front>
493    <seriesInfo name="RFC" value="2183"/>
494  </reference>
495
496  <reference anchor="RFC2231">
497    <front>
498      <title abbrev="MIME Value and Encoded Word Extensions">MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations</title>
499      <author initials="N." surname="Freed" fullname="Ned Freed">
500        <organization abbrev="Innosoft">Innosoft International, Inc.</organization>
501        <address><email>ned.freed@innosoft.com</email></address>
502      </author>
503      <author initials="K." surname="Moore" fullname="Keith Moore">
504        <organization>University of Tennessee</organization>
505        <address><email>moore@cs.utk.edu</email></address>
506      </author>
507      <date year="1997" month="November"/>
508    </front>
509    <seriesInfo name="RFC" value="2231"/>
510  </reference>
511
512  <reference anchor="RFC3629">
513    <front>
514      <title>UTF-8, a transformation format of ISO 10646</title>
515      <author initials="F." surname="Yergeau" fullname="F. Yergeau">
516        <organization>Alis Technologies</organization>
517        <address><email>fyergeau@alis.com</email></address>
518      </author>
519      <date month="November" year="2003"/>
520    </front>
521    <seriesInfo name="STD" value="63"/>
522    <seriesInfo name="RFC" value="3629"/>
523  </reference>
524
525  <reference anchor="RFC3864">
526    <front>
527      <title>Registration Procedures for Message Header Fields</title>
528      <author initials="G." surname="Klyne" fullname="G. Klyne">
529        <organization>Nine by Nine</organization>
530        <address><email>GK-IETF@ninebynine.org</email></address>
531      </author>
532      <author initials="M." surname="Nottingham" fullname="M. Nottingham">
533        <organization>BEA Systems</organization>
534        <address><email>mnot@pobox.com</email></address>
535      </author>
536      <author initials="J." surname="Mogul" fullname="J. Mogul">
537        <organization>HP Labs</organization>
538        <address><email>JeffMogul@acm.org</email></address>
539      </author>
540      <date year="2004" month="September"/>
541    </front>
542    <seriesInfo name="BCP" value="90"/>
543    <seriesInfo name="RFC" value="3864"/>
544  </reference>
545
546  <reference anchor="RFC3986">
547   <front>
548    <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
549    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
550      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
551      <address>
552         <email>timbl@w3.org</email>
553         <uri>http://www.w3.org/People/Berners-Lee/</uri>
554      </address>
555    </author>
556    <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
557      <organization abbrev="Day Software">Day Software</organization>
558      <address>
559        <email>fielding@gbiv.com</email>
560        <uri>http://roy.gbiv.com/</uri>
561      </address>
562    </author>
563    <author initials="L." surname="Masinter" fullname="Larry Masinter">
564      <organization abbrev="Adobe Systems">Adobe Systems Incorporated</organization>
565      <address>
566        <email>LMM@acm.org</email>
567        <uri>http://larry.masinter.net/</uri>
568      </address>
569    </author>
570    <date month="January" year="2005"/>
571   </front>
572   <seriesInfo name="STD" value="66"/>
573   <seriesInfo name="RFC" value="3986"/>
574  </reference>
575
576</references>
577
578<section title="Changes from the RFC 2616 Definition" anchor="changes.from.rfc2616">
579<t>
580  Compared to <xref target="RFC2616" x:fmt="of" x:sec="19.5.1"/>, the following
581  normative changes reflecting actual implementations have been made:
582<list style="symbols">
583  <t>
584    According to RFC 2616, the disposition type "attachment" only applies to
585    content of type "application/octet-stream". This restriction has been
586    removed, because user agents in practice do not check the content type, and
587    it also discourages properly declaring the media type.
588  </t>
589  <t>
590    RFC 2616 only allows "quoted-string" for the filename parameter. This
591    would be an exceptional parameter syntax, and also doesn't reflect actual
592    use.
593  </t>
594  <t>
595    The definition for the disposition type "inline" (<xref target="RFC2183" x:fmt="," x:sec="2.1"/>)
596    has been re-added with a suggestion for its processing.
597  </t>
598  <t>
599    This specification requires support for the extended parameter encoding
600    defined in <xref target="RFC5987"/>.
601  </t>
602</list>
603</t>
604</section>
605
606<section title="Differences compared to RFC 2183" anchor="diffs.compared.to.rfc2183">
607<t>
608  <xref target="RFC2183" x:fmt="of" x:sec="2"/> defines several additional
609  disposition parameters: "creation-date", "modification-date",
610  "quoted-date-time", and "size". These do not appear to be implemented by
611  any user agent, thus have been omitted from this specification.
612</t>
613</section>
614
615<section title="Alternative Approaches to Internationalization" anchor="alternatives">
616<t>
617  By default, HTTP header field parameters cannot carry characters outside
618  the ISO-8859-1 (<xref target="ISO-8859-1"/>) character encoding (see
619  <xref target="RFC2616" x:fmt="," x:sec="2.2"/>). For the "filename"
620  parameter, this of course is an unacceptable restriction.
621</t>
622<t>
623  Unfortunately, user agent implementers have not managed to come up with
624  an interoperable approach, although the IETF Standards Track specifies
625  exactly one solution (<xref target="RFC2231"/>, clarified and profiled for
626  HTTP in <xref target="RFC5987"/>).
627</t>
628<t>
629  For completeness, the sections below describe the various approaches that
630  have been tried, and explains how they are inferior to the RFC 5987
631  encoding used in this specification.
632</t>
633
634<section title="RFC 2047 Encoding" anchor="alternatives.rfc2047">
635<t>
636  RFC 2047 defines an encoding mechanism for
637  header fields, but this encoding is not supposed to be used for
638  header field parameters - see <xref target="RFC2047" x:fmt="of" x:sec="5"/>: 
639</t>
640<x:blockquote cite="http://tools.ietf.org/html/rfc2047#section-5">
641  <t>
642    An 'encoded-word' MUST NOT appear within a 'quoted-string'.
643  </t>
644  <t>
645    ...
646  </t>
647  <t>
648    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'.
649  </t>
650</x:blockquote>
651<t>
652  In practice, some user agents implement the encoding, some do not
653  (exposing the encoded string to the user), and some get confused by it.
654</t>
655</section>
656
657<section title="Percent Encoding" anchor="alternatives.percent">
658<t>
659  Some user agents accept percent encoded (<xref target="RFC3986" x:fmt="," x:sec="2.1"/>)
660  sequences of characters encoded using the UTF-8 (<xref target="RFC3629"/>) character encoding.
661</t>
662<t>
663  In practice, this is hard to use because those user agents
664  that do not support it will display the escaped character sequence to the user.
665</t>
666<t>
667  Furthermore, the first user agent to implement this did choose the encoding
668  based on local settings; thus making it very hard to use in multi-lingual
669  environments.
670</t>
671</section>
672
673<section title="Encoding Sniffing" anchor="alternatives.sniff">
674<t>
675  Some user agents inspect the value (which defaults to ISO-8859-1) and
676  switch to UTF-8 when it seems to be more likely to be the correct
677  interpretation.
678</t>
679<t>
680  As with the approaches above, this is not interoperable and furthermore
681  risks misinterpreting the actual value.
682</t>
683</section>
684
685<section title="Implementations (to be removed by RFC Editor before publication)" anchor="alternatives.implementations">
686<t>
687  Unfortunately, as of September 2010, neither the encoding defined in RFCs 2231
688  and 5987, nor any of the alternate approaches discussed above was
689  implemented interoperably. Thus, this specification recommends the approach
690  defined in RFC 5987, which at least has the advantage of actually being
691  specified properly.
692</t>
693<t>
694  The table below shows the implementation support for the various approaches:
695</t>
696<texttable align="left">
697  <ttcol>User Agent</ttcol>
698  <ttcol>RFC 2231/5987</ttcol>
699  <ttcol>RFC 2047</ttcol>
700  <ttcol>Percent Encoding</ttcol>
701  <ttcol>Encoding Sniffing</ttcol>
702 
703  <c>Chrome</c>
704  <c>no</c>
705  <c>yes</c>
706  <c>yes</c>
707  <c>yes</c>
708
709  <c>Firefox</c>
710  <c>yes (*)</c>
711  <c>yes</c>
712  <c>no</c>
713  <c>yes</c>
714
715  <c>Internet Explorer</c>
716  <c>no</c>
717  <c>no</c>
718  <c>yes</c>
719  <c>no</c>
720
721  <c>Konqueror</c>
722  <c>yes</c>
723  <c>no</c>
724  <c>no</c>
725  <c>no</c>
726
727  <c>Opera</c>
728  <c>yes (*)</c>
729  <c>no</c>
730  <c>no</c>
731  <c>no</c>
732
733  <c>Safari</c>
734  <c>no</c>
735  <c>no</c>
736  <c>no</c>
737  <c>yes</c>
738 
739  <postamble>
740  (*) Does not implement the fallback behavior to "filename" described in
741  <xref target="disposition.parameter.filename"/>.
742  </postamble>
743
744</texttable>
745
746</section>
747
748</section>
749
750
751<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
752<section title="Since draft-reschke-rfc2183-in-http-00">
753<t> 
754  Adjust terminology ("header" -&gt; "header field").
755  Update rfc2231-in-http reference.
756</t>
757</section>
758
759
760<section title="Since draft-reschke-rfc2183-in-http-01">
761<t> 
762  Update rfc2231-in-http reference. Actually define the "filename"
763  parameter. Add internationalization considerations.
764  Add examples using the RFC 5987 encoding.
765  Add overview over other approaches, plus a table reporting
766  implementation status.
767  Add and resolve issue "nodep2183".
768  Add issues "asciivsiso",
769  "deplboth", "quoted", and "registry".
770</t>
771</section>
772
773<section title="Since draft-reschke-rfc2183-in-http-02">
774<t>
775  Add and close issue "docfallback".
776  Close issues "asciivsiso", "deplboth", "quoted", and
777  "registry".
778</t>
779</section>
780
781<section title="Since draft-reschke-rfc2183-in-http-03">
782<t>
783  Updated to be a Working Draft of the IETF HTTPbis Working Group.
784</t>
785</section>
786
787<section title="Since draft-ietf-httpbis-content-disp-00" anchor="changes.since.00">
788<t>
789  Closed issues:
790  <list style="symbols">
791    <t>
792      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/242"/>:
793      "handling of unknown disposition types"
794    </t>
795  </list>
796</t>
797<t>
798  Slightly updated the notes about the proposed fallback behavior.
799</t>
800</section>
801</section>
802
803
804  </back>
805
806</rfc>
Note: See TracBrowser for help on using the repository browser.