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

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

rephrase some conformance requirements, add new section about conformance in general

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