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