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

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

Add more prose about implied LWS, also include quoted-string into the ABNF, and explain that value is "token | quoted-string" (see #253)

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