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