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

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

update on Chrome impl status for 5987 encoding

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