source: draft-ietf-httpbis-content-disp/05/draft-ietf-httpbis-content-disp.redxml @ 1838

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

Prepare C-D draft 05.

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