source: draft-ietf-httpbis-content-disp/04/draft-ietf-httpbis-content-disp-04.xml @ 2362

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

fix mime types

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