idnits 2.17.1 draft-ietf-httpbis-content-disp-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC2616, but the abstract doesn't seem to directly say this. It does mention RFC2616 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC2616, updated by this document, for RFC5378 checks: 1997-10-16) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (March 28, 2011) is 4740 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO-8859-1' ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 5987 (Obsoleted by RFC 8187) -- Obsolete informational reference (is this intentional?): RFC 2388 (Obsoleted by RFC 7578) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTPbis Working Group J. Reschke 3 Internet-Draft greenbytes 4 Updates: 2616 (if approved) March 28, 2011 5 Intended status: Standards Track 6 Expires: September 29, 2011 8 Use of the Content-Disposition Header Field in the 9 Hypertext Transfer Protocol (HTTP) 10 draft-ietf-httpbis-content-disp-09 12 Abstract 14 RFC 2616 defines the Content-Disposition response header field, but 15 points out that it is not part of the HTTP/1.1 Standard. This 16 specification takes over the definition and registration of Content- 17 Disposition, as used in HTTP, and clarifies internationalization 18 aspects. 20 Editorial Note (To be removed by RFC Editor before publication) 22 This specification is expected to replace the definition of Content- 23 Disposition in the HTTP/1.1 specification, as currently revised by 24 the IETF HTTPbis working group. See also 25 . 27 Discussion of this draft should take place on the HTTPBIS working 28 group mailing list (ietf-http-wg@w3.org). The current issues list is 29 at and related documents (including fancy 31 diffs) can be found at . 33 The changes in this draft are summarized in Appendix E.13. 35 Status of This Memo 37 This Internet-Draft is submitted in full conformance with the 38 provisions of BCP 78 and BCP 79. 40 Internet-Drafts are working documents of the Internet Engineering 41 Task Force (IETF). Note that other groups may also distribute 42 working documents as Internet-Drafts. The list of current Internet- 43 Drafts is at http://datatracker.ietf.org/drafts/current/. 45 Internet-Drafts are draft documents valid for a maximum of six months 46 and may be updated, replaced, or obsoleted by other documents at any 47 time. It is inappropriate to use Internet-Drafts as reference 48 material or to cite them other than as "work in progress." 49 This Internet-Draft will expire on September 29, 2011. 51 Copyright Notice 53 Copyright (c) 2011 IETF Trust and the persons identified as the 54 document authors. All rights reserved. 56 This document is subject to BCP 78 and the IETF Trust's Legal 57 Provisions Relating to IETF Documents 58 (http://trustee.ietf.org/license-info) in effect on the date of 59 publication of this document. Please review these documents 60 carefully, as they describe your rights and restrictions with respect 61 to this document. Code Components extracted from this document must 62 include Simplified BSD License text as described in Section 4.e of 63 the Trust Legal Provisions and are provided without warranty as 64 described in the Simplified BSD License. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 69 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 4 70 3. Conformance and Error Handling . . . . . . . . . . . . . . . . 4 71 4. Header Field Definition . . . . . . . . . . . . . . . . . . . 5 72 4.1. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 5 73 4.2. Disposition Type . . . . . . . . . . . . . . . . . . . . . 6 74 4.3. Disposition Parameter: 'Filename' . . . . . . . . . . . . 6 75 4.4. Disposition Parameter: Extensions . . . . . . . . . . . . 7 76 4.5. Extensibility . . . . . . . . . . . . . . . . . . . . . . 7 77 5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 78 6. Internationalization Considerations . . . . . . . . . . . . . 8 79 7. Security Considerations . . . . . . . . . . . . . . . . . . . 9 80 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 81 8.1. Registry for Disposition Values and Parameter . . . . . . 9 82 8.2. Header Field Registration . . . . . . . . . . . . . . . . 9 83 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 84 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 85 10.1. Normative References . . . . . . . . . . . . . . . . . . . 9 86 10.2. Informative References . . . . . . . . . . . . . . . . . . 10 87 Appendix A. Changes from the RFC 2616 Definition . . . . . . . . 11 88 Appendix B. Differences compared to RFC 2183 . . . . . . . . . . 11 89 Appendix C. Alternative Approaches to Internationalization . . . 11 90 C.1. RFC 2047 Encoding . . . . . . . . . . . . . . . . . . . . 12 91 C.2. Percent Encoding . . . . . . . . . . . . . . . . . . . . . 12 92 C.3. Encoding Sniffing . . . . . . . . . . . . . . . . . . . . 12 93 C.4. Implementations (to be removed by RFC Editor before 94 publication) . . . . . . . . . . . . . . . . . . . . . . . 12 95 Appendix D. Advice on Generating Content-Disposition Header 96 Fields . . . . . . . . . . . . . . . . . . . . . . . 13 97 Appendix E. Change Log (to be removed by RFC Editor before 98 publication) . . . . . . . . . . . . . . . . . . . . 14 99 E.1. Since draft-reschke-rfc2183-in-http-00 . . . . . . . . . . 14 100 E.2. Since draft-reschke-rfc2183-in-http-01 . . . . . . . . . . 14 101 E.3. Since draft-reschke-rfc2183-in-http-02 . . . . . . . . . . 15 102 E.4. Since draft-reschke-rfc2183-in-http-03 . . . . . . . . . . 15 103 E.5. Since draft-ietf-httpbis-content-disp-00 . . . . . . . . . 15 104 E.6. Since draft-ietf-httpbis-content-disp-01 . . . . . . . . . 15 105 E.7. Since draft-ietf-httpbis-content-disp-02 . . . . . . . . . 15 106 E.8. Since draft-ietf-httpbis-content-disp-03 . . . . . . . . . 15 107 E.9. Since draft-ietf-httpbis-content-disp-04 . . . . . . . . . 16 108 E.10. Since draft-ietf-httpbis-content-disp-05 . . . . . . . . . 16 109 E.11. Since draft-ietf-httpbis-content-disp-06 . . . . . . . . . 16 110 E.12. Since draft-ietf-httpbis-content-disp-07 . . . . . . . . . 17 111 E.13. Since draft-ietf-httpbis-content-disp-08 . . . . . . . . . 17 112 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 114 1. Introduction 116 RFC 2616 defines the Content-Disposition response header field in 117 Section 19.5.1 of [RFC2616], but points out that it is not part of 118 the HTTP/1.1 Standard (Section 15.5): 120 Content-Disposition is not part of the HTTP standard, but since it 121 is widely implemented, we are documenting its use and risks for 122 implementers. 124 This specification takes over the definition and registration of 125 Content-Disposition, as used in HTTP. Based on interoperability 126 testing with existing User Agents, it fully defines a profile of the 127 features defined in the Multipurpose Internet Mail Extensions (MIME) 128 variant ([RFC2183]) of the header field, and also clarifies 129 internationalization aspects. 131 Note: this document does not apply to Content-Disposition header 132 fields appearing in payload bodies transmitted over HTTP, such as 133 when using the media type "multipart/form-data" ([RFC2388]). 135 2. Notational Conventions 137 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 138 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 139 document are to be interpreted as described in [RFC2119]. 141 This specification uses the augmented BNF (ABNF) notation defined in 142 Section 2.1 of [RFC2616], including its rules for implied linear 143 whitespace (LWS). 145 3. Conformance and Error Handling 147 This specification defines conformance criteria for both senders 148 (usually, HTTP origin servers) and recipients (usually, HTTP user 149 agents) of the Content-Disposition header field. An implementation 150 is considered conformant if it complies with all of the requirements 151 associated with its role. 153 This specification also defines certain forms of the header field- 154 value to be invalid, using both ABNF and prose requirements 155 (Section 4), but it does not define special handling of these invalid 156 field-values. 158 Senders MUST NOT generate Content-Disposition header fields that are 159 invalid. 161 Recipients MAY take steps to recover a usable field-value from an 162 invalid header field, but SHOULD NOT reject the message outright, 163 unless this is explicitly desirable behaviour (e.g., the 164 implementation is a validator). As such, the default handling of 165 invalid fields is to ignore them. 167 4. Header Field Definition 169 The Content-Disposition response header field is used to convey 170 additional information about how to process the response payload, and 171 also can be used to attach additional metadata, such as the filename 172 to use when saving the response payload locally. 174 4.1. Grammar 176 content-disposition = "Content-Disposition" ":" 177 disposition-type *( ";" disposition-parm ) 179 disposition-type = "inline" | "attachment" | disp-ext-type 180 ; case-insensitive 181 disp-ext-type = token 183 disposition-parm = filename-parm | disp-ext-parm 185 filename-parm = "filename" "=" value 186 | "filename*" "=" ext-value 188 disp-ext-parm = token "=" value 189 | ext-token "=" ext-value 190 ext-token = 192 Defined in [RFC2616]: 194 token = 195 quoted-string = 196 value = 197 ; token | quoted-string 199 Defined in [RFC5987]: 201 ext-value = 203 Content-Disposition header field values with multiple instances of 204 the same parameter name are invalid. 206 Note that due to the rules for implied linear whitespace (Section 2.1 207 of [RFC2616]), OPTIONAL whitespace can appear between words (token or 208 quoted-string) and separator characters. 210 Furthermore note that the format used for ext-value allows specifying 211 a natural language (e.g., "en"); this is of limited use for filenames 212 and is likely to be ignored by recipients. 214 4.2. Disposition Type 216 If the disposition type matches "attachment" (case-insensitively), 217 this indicates that the recipient should prompt the user to save the 218 response locally, rather than process it normally (as per its media 219 type). 221 On the other hand, if it matches "inline" (case-insensitively), this 222 implies default processing. Therefore, the disposition type "inline" 223 is only useful when it is augmented with additional parameters, such 224 as the filename (see below). 226 Unknown or unhandled disposition types SHOULD be handled by 227 recipients the same way as "attachment" (see also [RFC2183], Section 228 2.8). 230 4.3. Disposition Parameter: 'Filename' 232 The parameters "filename" and "filename*", to be matched case- 233 insensitively, provide information on how to construct a filename for 234 storing the message payload. 236 Depending on the disposition type, this information might be used 237 right away (in the "save as..." interaction caused for the 238 "attachment" disposition type), or later on (for instance, when the 239 user decides to save the contents of the current page being 240 displayed). 242 The parameters "filename" and "filename*" differ only in that 243 "filename*" uses the encoding defined in [RFC5987], allowing the use 244 of characters not present in the ISO-8859-1 character set 245 ([ISO-8859-1]). 247 Many user agent implementations predating this specification do not 248 understand the "filename*" parameter. Therefore, when both 249 "filename" and "filename*" are present in a single header field 250 value, recipients SHOULD pick "filename*" and ignore "filename". 251 This way, senders can avoid special-casing specific user agents by 252 sending both the more expressive "filename*" parameter, and the 253 "filename" parameter as fallback for legacy recipients (see Section 5 254 for an example). 256 It is essential that recipients treat the specified filename as 257 advisory only, thus be very careful in extracting the desired 258 information. In particular: 260 o Recipients MUST NOT be able to write into any location other than 261 one to which they are specifically entitled. To illustrate the 262 problem consider the consequences of being able to overwrite well- 263 known system locations (such as "/etc/passwd"). One strategy to 264 achieve this is to never trust folder name information in the 265 filename parameter, for instance by stripping all but the last 266 path segment and only consider the actual filename (where 'path 267 segment' are the components of the field value delimited by the 268 path separator characters "\" and "/"). 270 o Many platforms do not use Internet Media Types ([RFC2046]) to hold 271 type information in the file system, but rely on filename 272 extensions instead. Trusting the server-provided file extension 273 could introduce a privilege escalation when the saved file is 274 later opened (consider ".exe"). Thus, recipients which make use 275 of file extensions to determine the media type MUST ensure that a 276 file extension is used that is safe, optimally matching the media 277 type of the received payload. 279 o Recipients SHOULD strip or replace character sequences that are 280 known to cause confusion both in user interfaces and in filenames, 281 such as control characters and leading and trailing whitespace. 283 o Other aspects recipients need to be aware of are names that have a 284 special meaning in the file system or in shell commands, such as 285 "." and "..", "~", "|", and also device names. Recipients SHOULD 286 ignore or substitute names like these. 288 Note: Many user agents do not properly handle the escape character 289 "\" when using the quoted-string form. Furthermore, some user 290 agents erroneously try to perform unescaping of "percent" escapes 291 (see Appendix C.2), and thus might misinterpret filenames 292 containing the percent character followed by two hex digits. 294 4.4. Disposition Parameter: Extensions 296 To enable future extensions, recipients SHOULD ignore unrecognized 297 parameters (see also [RFC2183], Section 2.8). 299 4.5. Extensibility 301 Note that Section 9 of [RFC2183] defines IANA registries both for 302 disposition types and disposition parameters. This registry is 303 shared by different protocols using Content-Disposition, such as MIME 304 and HTTP. Therefore, not all registered values may make sense in the 305 context of HTTP. 307 5. Examples 309 Direct UA to show "save as" dialog, with a filename of 310 "example.html": 312 Content-Disposition: Attachment; filename=example.html 314 Direct UA to behave as if the Content-Disposition header field wasn't 315 present, but to remember the filename "an example.html" for a 316 subsequent save operation: 318 Content-Disposition: INLINE; FILENAME= "an example.html" 320 Note: this uses the quoted-string form so that the space character 321 can be included. 323 Direct UA to show "save as" dialog, with a filename containing the 324 Unicode character U+20AC (EURO SIGN): 326 Content-Disposition: attachment; 327 filename*= UTF-8''%e2%82%ac%20rates 329 Here, the encoding defined in [RFC5987] is also used to encode the 330 non-ISO-8859-1 character. 332 Same as above, but adding the "filename" parameter for compatibility 333 with user agents not implementing RFC 5987: 335 Content-Disposition: attachment; 336 filename="EURO rates"; 337 filename*=utf-8''%e2%82%ac%20rates 339 Note: those user agents that do not support the RFC 5987 encoding 340 ignore "filename*" when it occurs after "filename". 342 6. Internationalization Considerations 344 The "filename*" parameter (Section 4.3), using the encoding defined 345 in [RFC5987], allows the server to transmit characters outside the 346 ISO-8859-1 character set, and also to optionally specify the language 347 in use. 349 Future parameters might also require internationalization, in which 350 case the same encoding can be used. 352 7. Security Considerations 354 Using server-supplied information for constructing local filenames 355 introduces many risks. These are summarized in Section 4.3. 357 Furthermore, implementers also ought to be aware of the Security 358 Considerations applying to HTTP (see Section 15 of [RFC2616]), and 359 also the parameter encoding defined in [RFC5987] (see Section 5). 361 8. IANA Considerations 363 8.1. Registry for Disposition Values and Parameter 365 This specification does not introduce any changes to the registration 366 procedures for disposition values and parameters that are defined in 367 Section 9 of [RFC2183]. 369 8.2. Header Field Registration 371 This document updates the definition of the Content-Disposition HTTP 372 header field in the permanent HTTP header field registry (see 373 [RFC3864]). 375 Header field name: Content-Disposition 377 Applicable protocol: http 379 Status: standard 381 Author/Change controller: IETF 383 Specification document: this specification (Section 4) 385 Related information: none 387 9. Acknowledgements 389 Thanks to Adam Barth, Rolf Eike Beer, Stewart Bryant, Bjoern 390 Hoehrmann, Alfred Hoenes, Roar Lauritzsen, Alexey Melnikov, Henrik 391 Nordstrom, and Mark Nottingham for their valuable feedback. 393 10. References 395 10.1. Normative References 397 [ISO-8859-1] International Organization for Standardization, 398 "Information technology -- 8-bit single-byte coded 399 graphic character sets -- Part 1: Latin alphabet No. 401 1", ISO/IEC 8859-1:1998, 1998. 403 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 404 Requirement Levels", BCP 14, RFC 2119, March 1997. 406 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 407 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 408 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 410 [RFC5987] Reschke, J., "Character Set and Language Encoding for 411 Hypertext Transfer Protocol (HTTP) Header Field 412 Parameters", RFC 5987, August 2010. 414 10.2. Informative References 416 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet 417 Mail Extensions (MIME) Part Two: Media Types", 418 RFC 2046, November 1996. 420 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail 421 Extensions) Part Three: Message Header Extensions for 422 Non-ASCII Text", RFC 2047, November 1996. 424 [RFC2183] Troost, R., Dorner, S., and K. Moore, "Communicating 425 Presentation Information in Internet Messages: The 426 Content-Disposition Header Field", RFC 2183, 427 August 1997. 429 [RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and 430 Encoded Word Extensions: Character Sets, Languages, and 431 Continuations", RFC 2231, November 1997. 433 [RFC2388] Masinter, L., "Returning Values from Forms: multipart/ 434 form-data", RFC 2388, August 1998. 436 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 437 Procedures for Message Header Fields", BCP 90, 438 RFC 3864, September 2004. 440 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, 441 "Uniform Resource Identifier (URI): Generic Syntax", 442 STD 66, RFC 3986, January 2005. 444 [US-ASCII] American National Standards Institute, "Coded Character 445 Set -- 7-bit American Standard Code for Information 446 Interchange", ANSI X3.4, 1986. 448 Appendix A. Changes from the RFC 2616 Definition 450 Compared to Section 19.5.1 of [RFC2616], the following normative 451 changes reflecting actual implementations have been made: 453 o According to RFC 2616, the disposition type "attachment" only 454 applies to content of type "application/octet-stream". This 455 restriction has been removed, because recipients in practice do 456 not check the content type, and it also discourages properly 457 declaring the media type. 459 o RFC 2616 only allows "quoted-string" for the filename parameter. 460 This would be an exceptional parameter syntax, and also doesn't 461 reflect actual use. 463 o The definition for the disposition type "inline" ([RFC2183], 464 Section 2.1) has been re-added with a suggestion for its 465 processing. 467 o This specification requires support for the extended parameter 468 encoding defined in [RFC5987]. 470 Appendix B. Differences compared to RFC 2183 472 Section 2 of [RFC2183] defines several additional disposition 473 parameters: "creation-date", "modification-date", "quoted-date-time", 474 and "size". The majority of user agents does not implement these, 475 thus they have been omitted from this specification. 477 Appendix C. Alternative Approaches to Internationalization 479 By default, HTTP header field parameters cannot carry characters 480 outside the ISO-8859-1 ([ISO-8859-1]) character encoding (see 481 [RFC2616], Section 2.2). For the "filename" parameter, this of 482 course is an unacceptable restriction. 484 Unfortunately, user agent implementers have not managed to come up 485 with an interoperable approach, although the IETF Standards Track 486 specifies exactly one solution ([RFC2231], clarified and profiled for 487 HTTP in [RFC5987]). 489 For completeness, the sections below describe the various approaches 490 that have been tried, and explains how they are inferior to the RFC 491 5987 encoding used in this specification. 493 C.1. RFC 2047 Encoding 495 RFC 2047 defines an encoding mechanism for header fields, but this 496 encoding is not supposed to be used for header field parameters - see 497 Section 5 of [RFC2047]: 499 An 'encoded-word' MUST NOT appear within a 'quoted-string'. 501 ... 503 An 'encoded-word' MUST NOT be used in parameter of a MIME Content- 504 Type or Content-Disposition field, or in any structured field body 505 except within a 'comment' or 'phrase'. 507 In practice, some user agents implement the encoding, some do not 508 (exposing the encoded string to the user), and some get confused by 509 it. 511 C.2. Percent Encoding 513 Some user agents accept percent encoded ([RFC3986], Section 2.1) 514 sequences of characters. The character encoding being used for 515 decoding depends on various factors, including the encoding of the 516 referring page, the user agent's locale, its configuration, and also 517 the actual value of the parameter. 519 In practice, this is hard to use because those user agents that do 520 not support it will display the escaped character sequence to the 521 user. For those user agents that do implement this it is difficult 522 to predict what character encoding they actually expect. 524 C.3. Encoding Sniffing 526 Some user agents inspect the value (which defaults to ISO-8859-1 for 527 the quoted-string form) and switch to UTF-8 when it seems to be more 528 likely to be the correct interpretation. 530 As with the approaches above, this is not interoperable and 531 furthermore risks misinterpreting the actual value. 533 C.4. Implementations (to be removed by RFC Editor before publication) 535 Unfortunately, as of March 2011, neither the encoding defined in RFCs 536 2231 and 5987, nor any of the alternate approaches discussed above 537 was implemented interoperably. Thus, this specification recommends 538 the approach defined in RFC 5987, which at least has the advantage of 539 actually being specified properly. 541 The table below shows the support for the various approaches in the 542 current implementations: 544 +---------------+------------+--------+--------------+--------------+ 545 | User Agent | RFC | RFC | Percent | Encoding | 546 | | 2231/5987 | 2047 | Encoding | Sniffing | 547 +---------------+------------+--------+--------------+--------------+ 548 | Chrome | yes | yes | yes | yes | 549 | Firefox | yes (*) | yes | no | yes | 550 | Internet | yes (**) | no | yes | no | 551 | Explorer | | | | | 552 | Konqueror | yes | no | no | no | 553 | Opera | yes | no | no | no | 554 | Safari | no | no | no | yes | 555 +---------------+------------+--------+--------------+--------------+ 557 (*) Does not implement the fallback behavior to "filename" described 558 in Section 4.3; a fix is planned for Firefox 5. 560 (**) Starting with Internet Explorer 9, but only implements UTF-8. 562 Appendix D. Advice on Generating Content-Disposition Header Fields 564 To successfully interoperate with existing and future user agents, 565 senders of the Content-Disposition header field are advised to: 567 o Include a "filename" parameter when US-ASCII ([US-ASCII]) is 568 sufficiently expressive. 570 o Use the 'token' form of the filename parameter only when it does 571 not contain disallowed characters (e.g., spaces); in such cases, 572 the quoted-string form should be used. 574 o Avoid including the percent character followed by two hexadecimal 575 characters (e.g., %A9) in the filename parameter, since some 576 existing implementations consider it to be an escape character, 577 while others will pass it through unchanged. 579 o Avoid including the "\" character in the quoted-string form of the 580 filename parameter, as escaping is not implemented by some user 581 agents, and can be considered as an illegal path character. 583 o Avoid using non-ASCII characters in the filename parameter. 584 Although most existing implementations will decode them as ISO- 585 8859-1, some will apply heuristics to detect UTF-8, and thus might 586 fail on certain names. 588 o Include a "filename*" parameter where the desired filename cannot 589 be expressed faithfully using the "filename" form. Note that 590 legacy user agents will not process this, and will fall back to 591 using the "filename" parameter's content. 593 o When a "filename*" parameter is sent, to also generate a 594 "filename" parameter as a fallback for user agents that do not 595 support the "filename*" form, if possible. This can be done by 596 substituting characters with US-ASCII sequences (e.g., Unicode 597 character point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by 598 "ae"). Note that this may not be possible in some locales. 600 o When a "filename" parameter is included as a fallback (as per 601 above), "filename" should occur first, due to parsing problems in 602 some existing implementations. [[fallbackbug: Firefox is known to 603 pick the wrong parameter; a bug fix is scheduled for Firefox 5. 604 --jre]] [[NOTE-TO-RFC-EDITOR: PLEASE REMOVE THIS AND THE PRECEDING 605 COMMENT BEFORE PUBLICATION AS RFC. --jre]] 607 o Use UTF-8 as the encoding of the "filename*" parameter, when 608 present, because at least one existing implementation only 609 implements that encoding. 611 Note that this advice is based upon UA behaviour at the time of 612 writing, and might be superseded. At the time of publication of this 613 document, 614 provides an overview of current levels of support in various 615 implementations. 617 Appendix E. Change Log (to be removed by RFC Editor before publication) 619 Note: the issues names in the change log entries for 620 draft-reschke-rfc2183-in-http refer to . 623 E.1. Since draft-reschke-rfc2183-in-http-00 625 Adjust terminology ("header" -> "header field"). Update rfc2231-in- 626 http reference. 628 E.2. Since draft-reschke-rfc2183-in-http-01 630 Update rfc2231-in-http reference. Actually define the "filename" 631 parameter. Add internationalization considerations. Add examples 632 using the RFC 5987 encoding. Add overview over other approaches, 633 plus a table reporting implementation status. Add and resolve issue 634 "nodep2183". Add issues "asciivsiso", "deplboth", "quoted", and 635 "registry". 637 E.3. Since draft-reschke-rfc2183-in-http-02 639 Add and close issue "docfallback". Close issues "asciivsiso", 640 "deplboth", "quoted", and "registry". 642 E.4. Since draft-reschke-rfc2183-in-http-03 644 Updated to be a Working Draft of the IETF HTTPbis Working Group. 646 E.5. Since draft-ietf-httpbis-content-disp-00 648 Closed issues: 650 o : "handling of 651 unknown disposition types" 653 Slightly updated the notes about the proposed fallback behavior. 655 E.6. Since draft-ietf-httpbis-content-disp-01 657 Various editorial improvements. 659 E.7. Since draft-ietf-httpbis-content-disp-02 661 Closed issues: 663 o : "state that 664 repeating parameters are invalid" 666 o : "warn about 667 %xx in filenames being misinterpreted" 669 o : "mention 670 control chars when talking about postprecessing the filename 671 parameter" 673 Update Appendix C.4; Opera 10.63 RC implements the recommended 674 fallback behavior. 676 E.8. Since draft-ietf-httpbis-content-disp-03 678 Closed issues: 680 o : 681 "'modification-date' *is* implemented in Konq 4.5" 683 o : "clarify what 684 LWS means for the Content-Disp grammar" 686 o : "Avoid passive 687 voice in message requirements" 689 o : "text about 690 historical percent-decoding unclear" 692 o : "add 693 explanation of language tagging" 695 o : "Clarify that 696 C-D spec does not apply to multipart upload" 698 E.9. Since draft-ietf-httpbis-content-disp-04 700 Updated implementation information (Chrome 9 implements RFC 5987, IE 701 9 RC implements it for UTF-8 only). 703 Clarify who requirements are on, add a section discussing conformance 704 and handling of invalid field values in general. 706 Closed issues: 708 o : "avoid 709 stating ISO-8859-1 default for header param" (the default is still 710 mentioned, but it was clarified what it applies to). 712 o : "Path 713 Separator Characters" 715 E.10. Since draft-ietf-httpbis-content-disp-05 717 Editorial changes: Fixed two typos where the new Conformance section 718 said "Content-Location" instead of "Content-Disposition". Cleaned up 719 terminology ("user agent", "recipient", "sender", "message body", 720 ...). Stated what the escape character for quoted-string is. 721 Explained a use case for "inline" disposition type. Updated 722 implementation notes with respect to the fallback behavior. 724 Added appendix "Advice on Generating Content-Disposition Header 725 Fields". 727 E.11. Since draft-ietf-httpbis-content-disp-06 729 Closed issues: 731 o : 732 "conformance language" 734 E.12. Since draft-ietf-httpbis-content-disp-07 736 Rephrase the requirement about well-known file system locations, and 737 also clarify that by "last path segment" we mean the actual filename. 738 Added a forward reference from "invalid" to the section that defines 739 a valid header field. 741 E.13. Since draft-ietf-httpbis-content-disp-08 743 Update: Internet Explorer 9 is released. Various editorial 744 improvements. Add US-ASCII reference. Strengthen file extension 745 handling requirement to MUST for those recipients that actually use 746 file extensions to map media types. 748 Index 750 C 751 Content-Disposition header field 5 753 H 754 Header Fields 755 Content-Disposition 5 757 Author's Address 759 Julian F. Reschke 760 greenbytes GmbH 761 Hafenweg 16 762 Muenster, NW 48155 763 Germany 765 EMail: julian.reschke@greenbytes.de 766 URI: http://greenbytes.de/tech/webdav/