source: draft-ietf-httpbis-content-disp/02/draft-ietf-httpbis-content-disp-02.xml @ 1694

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

fix mime types

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