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

Last change on this file since 1191 was 1085, checked in by julian.reschke@…, 12 years ago

draft-ietf-httpbis-content-disp-04

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