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

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

note that Chrome 9 supports 2231/5987

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