idnits 2.17.1 draft-ietf-httpbis-content-disp-08.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 14, 2011) is 4785 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 14, 2011 5 Intended status: Standards Track 6 Expires: September 15, 2011 8 Use of the Content-Disposition Header Field in the 9 Hypertext Transfer Protocol (HTTP) 10 draft-ietf-httpbis-content-disp-08 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.12. 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 15, 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 . . . . . . . . 10 88 Appendix B. Differences compared to RFC 2183 . . . . . . . . . . 11 89 Appendix C. Alternative Approaches to Internationalization . . . 11 90 C.1. RFC 2047 Encoding . . . . . . . . . . . . . . . . . . . . 11 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 . . . . . . . . . . 14 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 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 113 1. Introduction 115 RFC 2616 defines the Content-Disposition response header field in 116 Section 19.5.1 of [RFC2616], but points out that it is not part of 117 the HTTP/1.1 Standard (Section 15.5): 119 Content-Disposition is not part of the HTTP standard, but since it 120 is widely implemented, we are documenting its use and risks for 121 implementers. 123 This specification takes over the definition and registration of 124 Content-Disposition, as used in HTTP. Based on interoperability 125 testing with existing User Agents, it fully defines a profile of the 126 features defined in the Multipurpose Internet Mail Extensions (MIME) 127 variant ([RFC2183]) of the header field, and also clarifies 128 internationalization aspects. 130 Note: this document does not apply to Content-Disposition header 131 fields appearing in payload bodies transmitted over HTTP, such as 132 when using the media type "multipart/form-data" ([RFC2388]). 134 2. Notational Conventions 136 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 137 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 138 document are to be interpreted as described in [RFC2119]. 140 This specification uses the augmented BNF notation defined in Section 141 2.1 of [RFC2616], including its rules for implied linear whitespace 142 (LWS). 144 3. Conformance and Error Handling 146 This specification defines conformance criteria for both senders 147 (usually, HTTP origin servers) and recipients (usually, HTTP user 148 agents) of the Content-Disposition header field. An implementation 149 is considered conformant if it complies with all of the requirements 150 associated with its role. 152 This specification also defines certain forms of the header field- 153 value to be invalid, using both ABNF and prose requirements 154 (Section 4), but it does not define special handling of these invalid 155 field-values. 157 Senders MUST NOT generate Content-Disposition header fields that are 158 invalid. 160 Recipients MAY take steps to recover a usable field-value from an 161 invalid header field, but SHOULD NOT reject the message outright, 162 unless this is explicitly desirable behaviour (e.g., the 163 implementation is a validator). As such, the default handling of 164 invalid fields is to ignore them. 166 4. Header Field Definition 168 The Content-Disposition response header field is used to convey 169 additional information about how to process the response payload, and 170 also can be used to attach additional metadata, such as the filename 171 to use when saving the response payload locally. 173 4.1. Grammar 175 content-disposition = "Content-Disposition" ":" 176 disposition-type *( ";" disposition-parm ) 178 disposition-type = "inline" | "attachment" | disp-ext-type 179 ; case-insensitive 180 disp-ext-type = token 182 disposition-parm = filename-parm | disp-ext-parm 184 filename-parm = "filename" "=" value 185 | "filename*" "=" ext-value 187 disp-ext-parm = token "=" value 188 | ext-token "=" ext-value 189 ext-token = 191 Defined in [RFC2616]: 193 token = 194 quoted-string = 195 value = 196 ; token | quoted-string 198 Defined in [RFC5987]: 200 ext-value = 202 Header field values with multiple instances of the same parameter 203 name are invalid. 205 Note that due to the rules for implied linear whitespace (Section 2.1 206 of [RFC2616]), OPTIONAL whitespace can appear between words (token or 207 quoted-string) and separator characters. 209 Furthermore note that the format used for ext-value allows specifying 210 a natural language; this is of limited use for filenames and is 211 likely to be ignored by recipients. 213 4.2. Disposition Type 215 If the disposition type matches "attachment" (case-insensitively), 216 this indicates that the recipient should prompt the user to save the 217 response locally, rather than process it normally (as per its media 218 type). 220 On the other hand, if it matches "inline" (case-insensitively), this 221 implies default processing. Therefore, the disposition type "inline" 222 is only useful when it is augmented with additional parameters, such 223 as the filename (see below). 225 Unknown or unhandled disposition types SHOULD be handled by 226 recipients the same way as "attachment" (see also [RFC2183], Section 227 2.8). 229 4.3. Disposition Parameter: 'Filename' 231 The parameters "filename" and "filename*", to be matched case- 232 insensitively, provide information on how to construct a filename for 233 storing the message payload. 235 Depending on the disposition type, this information might be used 236 right away (in the "save as..." interaction caused for the 237 "attachment" disposition type), or later on (for instance, when the 238 user decides to save the contents of the current page being 239 displayed). 241 The parameters "filename" and "filename*" differ only in that 242 "filename*" uses the encoding defined in [RFC5987], allowing the use 243 of characters not present in the ISO-8859-1 character set 244 ([ISO-8859-1]). 246 Many user agent implementations predating this specification do not 247 understand the "filename*" parameter. Therefore, when both 248 "filename" and "filename*" are present in a single header field 249 value, recipients SHOULD pick "filename*" and ignore "filename". 250 This way, senders can avoid special-casing specific user agents by 251 sending both the more expressive "filename*" parameter, and the 252 "filename" parameter as fallback for legacy recipients (see Section 5 253 for an example). 255 It is essential that recipients treat the specified filename as 256 advisory only, thus be very careful in extracting the desired 257 information. In particular: 259 o Recipients MUST NOT be able to write into any location other than 260 one to which they are specifically entitled. To illustrate the 261 problem consider the consequences of being able to overwrite well- 262 known system locations (such as "/etc/passwd"). One strategy to 263 achieve this is to never trust folder name information in the 264 filename parameter, for instance by stripping all but the last 265 path segment and only consider the actual filename (where 'path 266 segment' are the components of the field value delimited by the 267 path separator characters "\" and "/"). 269 o Many platforms do not use Internet Media Types ([RFC2046]) to hold 270 type information in the file system, but rely on filename 271 extensions instead. Trusting the server-provided file extension 272 could introduce a privilege escalation when the saved file is 273 later opened (consider ".exe"). Thus, recipients SHOULD ensure 274 that a file extension is used that is safe, optimally matching the 275 media type of the received payload. 277 o Recipients SHOULD strip or replace character sequences that are 278 known to cause confusion both in user interfaces and in filenames, 279 such as control characters and leading and trailing whitespace. 281 o Other aspects recipients need to be aware of are names that have a 282 special meaning in the file system or in shell commands, such as 283 "." and "..", "~", "|", and also device names. Recipients SHOULD 284 ignore or substitute names like these. 286 Note: Many user agents do not properly handle the escape character 287 "\" when using the quoted-string form. Furthermore, some user 288 agents erroneously try to perform unescaping of "percent" escapes 289 (see Appendix C.2), and thus might misinterpret filenames 290 containing the percent character followed by two hex digits. 292 4.4. Disposition Parameter: Extensions 294 To enable future extensions, recipients SHOULD ignore unrecognized 295 parameters (see also [RFC2183], Section 2.8). 297 4.5. Extensibility 299 Note that Section 9 of [RFC2183] defines IANA registries both for 300 disposition types and disposition parameters. This registry is 301 shared by different protocols using Content-Disposition, such as MIME 302 and HTTP. Therefore, not all registered values may make sense in the 303 context of HTTP. 305 5. Examples 307 Direct UA to show "save as" dialog, with a filename of 308 "example.html": 310 Content-Disposition: Attachment; filename=example.html 312 Direct UA to behave as if the Content-Disposition header field wasn't 313 present, but to remember the filename "an example.html" for a 314 subsequent save operation: 316 Content-Disposition: INLINE; FILENAME= "an example.html" 318 Note: this uses the quoted-string form so that the space character 319 can be included. 321 Direct UA to show "save as" dialog, with a filename containing the 322 Unicode character U+20AC (EURO SIGN): 324 Content-Disposition: attachment; 325 filename*= UTF-8''%e2%82%ac%20rates 327 Here, the encoding defined in [RFC5987] is also used to encode the 328 non-ISO-8859-1 character. 330 Same as above, but adding the "filename" parameter for compatibility 331 with user agents not implementing RFC 5987: 333 Content-Disposition: attachment; 334 filename="EURO rates"; 335 filename*=utf-8''%e2%82%ac%20rates 337 Note: those user agents that do not support the RFC 5987 encoding 338 ignore "filename*" when it occurs after "filename". 340 6. Internationalization Considerations 342 The "filename*" parameter (Section 4.3), using the encoding defined 343 in [RFC5987], allows the server to transmit characters outside the 344 ISO-8859-1 character set, and also to optionally specify the language 345 in use. 347 Future parameters might also require internationalization, in which 348 case the same encoding can be used. 350 7. Security Considerations 352 Using server-supplied information for constructing local filenames 353 introduces many risks. These are summarized in Section 4.3. 355 Furthermore, implementers also ought to be aware of the Security 356 Considerations applying to HTTP (see Section 15 of [RFC2616]), and 357 also the parameter encoding defined in [RFC5987] (see Section 5). 359 8. IANA Considerations 361 8.1. Registry for Disposition Values and Parameter 363 This specification does not introduce any changes to the registration 364 procedures for disposition values and parameters that are defined in 365 Section 9 of [RFC2183]. 367 8.2. Header Field Registration 369 This document updates the definition of the Content-Disposition HTTP 370 header field in the permanent HTTP header field registry (see 371 [RFC3864]). 373 Header field name: Content-Disposition 375 Applicable protocol: http 377 Status: standard 379 Author/Change controller: IETF 381 Specification document: this specification (Section 4) 383 9. Acknowledgements 385 Thanks to Adam Barth, Rolf Eike Beer, Stewart Bryant, Bjoern 386 Hoehrmann, Alfred Hoenes, Roar Lauritzsen, Alexey Melnikov, Henrik 387 Nordstrom, and Mark Nottingham for their valuable feedback. 389 10. References 391 10.1. Normative References 393 [ISO-8859-1] International Organization for Standardization, 394 "Information technology -- 8-bit single-byte coded 395 graphic character sets -- Part 1: Latin alphabet No. 396 1", ISO/IEC 8859-1:1998, 1998. 398 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 399 Requirement Levels", BCP 14, RFC 2119, March 1997. 401 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 402 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 403 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 405 [RFC5987] Reschke, J., "Character Set and Language Encoding for 406 Hypertext Transfer Protocol (HTTP) Header Field 407 Parameters", RFC 5987, August 2010. 409 10.2. Informative References 411 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet 412 Mail Extensions (MIME) Part Two: Media Types", 413 RFC 2046, November 1996. 415 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail 416 Extensions) Part Three: Message Header Extensions for 417 Non-ASCII Text", RFC 2047, November 1996. 419 [RFC2183] Troost, R., Dorner, S., and K. Moore, "Communicating 420 Presentation Information in Internet Messages: The 421 Content-Disposition Header Field", RFC 2183, 422 August 1997. 424 [RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and 425 Encoded Word Extensions: Character Sets, Languages, and 426 Continuations", RFC 2231, November 1997. 428 [RFC2388] Masinter, L., "Returning Values from Forms: multipart/ 429 form-data", RFC 2388, August 1998. 431 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 432 Procedures for Message Header Fields", BCP 90, 433 RFC 3864, September 2004. 435 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, 436 "Uniform Resource Identifier (URI): Generic Syntax", 437 STD 66, RFC 3986, January 2005. 439 Appendix A. Changes from the RFC 2616 Definition 441 Compared to Section 19.5.1 of [RFC2616], the following normative 442 changes reflecting actual implementations have been made: 444 o According to RFC 2616, the disposition type "attachment" only 445 applies to content of type "application/octet-stream". This 446 restriction has been removed, because recipients in practice do 447 not check the content type, and it also discourages properly 448 declaring the media type. 450 o RFC 2616 only allows "quoted-string" for the filename parameter. 451 This would be an exceptional parameter syntax, and also doesn't 452 reflect actual use. 454 o The definition for the disposition type "inline" ([RFC2183], 455 Section 2.1) has been re-added with a suggestion for its 456 processing. 458 o This specification requires support for the extended parameter 459 encoding defined in [RFC5987]. 461 Appendix B. Differences compared to RFC 2183 463 Section 2 of [RFC2183] defines several additional disposition 464 parameters: "creation-date", "modification-date", "quoted-date-time", 465 and "size". The majority of user agents does not implement these, 466 thus they have been omitted from this specification. 468 Appendix C. Alternative Approaches to Internationalization 470 By default, HTTP header field parameters cannot carry characters 471 outside the ISO-8859-1 ([ISO-8859-1]) character encoding (see 472 [RFC2616], Section 2.2). For the "filename" parameter, this of 473 course is an unacceptable restriction. 475 Unfortunately, user agent implementers have not managed to come up 476 with an interoperable approach, although the IETF Standards Track 477 specifies exactly one solution ([RFC2231], clarified and profiled for 478 HTTP in [RFC5987]). 480 For completeness, the sections below describe the various approaches 481 that have been tried, and explains how they are inferior to the RFC 482 5987 encoding used in this specification. 484 C.1. RFC 2047 Encoding 486 RFC 2047 defines an encoding mechanism for header fields, but this 487 encoding is not supposed to be used for header field parameters - see 488 Section 5 of [RFC2047]: 490 An 'encoded-word' MUST NOT appear within a 'quoted-string'. 492 ... 494 An 'encoded-word' MUST NOT be used in parameter of a MIME Content- 495 Type or Content-Disposition field, or in any structured field body 496 except within a 'comment' or 'phrase'. 498 In practice, some user agents implement the encoding, some do not 499 (exposing the encoded string to the user), and some get confused by 500 it. 502 C.2. Percent Encoding 504 Some user agents accept percent encoded ([RFC3986], Section 2.1) 505 sequences of characters. The character encoding being used for 506 decoding depends on various factors, including the encoding of the 507 referring page, the user agent's locale, its configuration, and also 508 the actual value of the parameter. 510 In practice, this is hard to use because those user agents that do 511 not support it will display the escaped character sequence to the 512 user. For those user agents that do implement this it is difficult 513 to predict what character encoding they actually expect. 515 C.3. Encoding Sniffing 517 Some user agents inspect the value (which defaults to ISO-8859-1 for 518 the quoted-string form) and switch to UTF-8 when it seems to be more 519 likely to be the correct interpretation. 521 As with the approaches above, this is not interoperable and 522 furthermore risks misinterpreting the actual value. 524 C.4. Implementations (to be removed by RFC Editor before publication) 526 Unfortunately, as of March 2011, neither the encoding defined in RFCs 527 2231 and 5987, nor any of the alternate approaches discussed above 528 was implemented interoperably. Thus, this specification recommends 529 the approach defined in RFC 5987, which at least has the advantage of 530 actually being specified properly. 532 The table below shows the implementation support for the various 533 approaches: 535 +---------------+------------+--------+--------------+--------------+ 536 | User Agent | RFC | RFC | Percent | Encoding | 537 | | 2231/5987 | 2047 | Encoding | Sniffing | 538 +---------------+------------+--------+--------------+--------------+ 539 | Chrome | yes | yes | yes | yes | 540 | Firefox | yes (*) | yes | no | yes | 541 | Internet | yes (**) | no | yes | no | 542 | Explorer | | | | | 543 | Konqueror | yes | no | no | no | 544 | Opera | yes | no | no | no | 545 | Safari | no | no | no | yes | 546 +---------------+------------+--------+--------------+--------------+ 548 (*) Does not implement the fallback behavior to "filename" described 549 in Section 4.3; a fix is planned for Firefox 5. 551 (**) Starting with IE9RC, but only implements UTF-8. 553 Appendix D. Advice on Generating Content-Disposition Header Fields 555 To successfully interoperate with existing and future user agents, 556 senders of the Content-Disposition header field are advised to: 558 o Include a "filename" parameter when US-ASCII is sufficiently 559 expressive. 561 o Use the 'token' form of the filename parameter only when it does 562 not contain disallowed characters (e.g., spaces); in such cases, 563 the quoted-string form should be used. 565 o Avoid including the percent character followed by two hexadecimal 566 characters (e.g., %A9) in the filename parameter, since some 567 existing implementations consider it to be an escape character, 568 while others will pass it through unchanged. 570 o Avoid including the "\" character in the quoted-string form of the 571 filename parameter, as escaping is not implemented by some user 572 agents, and can be considered as an illegal path character. 574 o Avoid using non-ASCII characters in the filename parameter. 575 Although most existing implementations will decode them as ISO- 576 8859-1, some will apply heuristics to detect UTF-8, and thus might 577 fail on certain names. 579 o Include a "filename*" parameter where the desired filename cannot 580 be expressed faithfully using the "filename" form. Note that 581 legacy user agents will not process this, and will fall back to 582 using the "filename" parameter's content. 584 o When a "filename*" parameter is sent, to also generate a 585 "filename" parameter as a fallback for user agents that do not 586 support the "filename*" form, if possible. This can be done by 587 substituting characters with US-ASCII sequences (e.g., Unicode 588 character point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by 589 "ae"). Note that this may not be possible in some locales. 591 o When a "filename" parameter is included as a fallback (as per 592 above), "filename" should occur first, due to parsing problems in 593 some existing implementations. [[fallbackbug: Firefox is known to 594 pick the wrong parameter; a bug fix is scheduled for Firefox 5. 595 --jre]] 597 o Use UTF-8 as the encoding of the "filename*" parameter, when 598 present, because at least one existing implementation only 599 implements that encoding. 601 Note that this advice is based upon UA behaviour at the time of 602 writing, and might be superseded. At the time of publication of this 603 document, 604 provides an overview of current levels of support in various 605 implementations. 607 Appendix E. Change Log (to be removed by RFC Editor before publication) 609 Note: the issues names in the change log entries for 610 draft-reschke-rfc2183-in-http refer to . 613 E.1. Since draft-reschke-rfc2183-in-http-00 615 Adjust terminology ("header" -> "header field"). Update rfc2231-in- 616 http reference. 618 E.2. Since draft-reschke-rfc2183-in-http-01 620 Update rfc2231-in-http reference. Actually define the "filename" 621 parameter. Add internationalization considerations. Add examples 622 using the RFC 5987 encoding. Add overview over other approaches, 623 plus a table reporting implementation status. Add and resolve issue 624 "nodep2183". Add issues "asciivsiso", "deplboth", "quoted", and 625 "registry". 627 E.3. Since draft-reschke-rfc2183-in-http-02 629 Add and close issue "docfallback". Close issues "asciivsiso", 630 "deplboth", "quoted", and "registry". 632 E.4. Since draft-reschke-rfc2183-in-http-03 634 Updated to be a Working Draft of the IETF HTTPbis Working Group. 636 E.5. Since draft-ietf-httpbis-content-disp-00 638 Closed issues: 640 o : "handling of 641 unknown disposition types" 643 Slightly updated the notes about the proposed fallback behavior. 645 E.6. Since draft-ietf-httpbis-content-disp-01 647 Various editorial improvements. 649 E.7. Since draft-ietf-httpbis-content-disp-02 651 Closed issues: 653 o : "state that 654 repeating parameters are invalid" 656 o : "warn about 657 %xx in filenames being misinterpreted" 659 o : "mention 660 control chars when talking about postprecessing the filename 661 parameter" 663 Update Appendix C.4; Opera 10.63 RC implements the recommended 664 fallback behavior. 666 E.8. Since draft-ietf-httpbis-content-disp-03 668 Closed issues: 670 o : 671 "'modification-date' *is* implemented in Konq 4.5" 673 o : "clarify what 674 LWS means for the Content-Disp grammar" 676 o : "Avoid passive 677 voice in message requirements" 679 o : "text about 680 historical percent-decoding unclear" 682 o : "add 683 explanation of language tagging" 685 o : "Clarify that 686 C-D spec does not apply to multipart upload" 688 E.9. Since draft-ietf-httpbis-content-disp-04 690 Updated implementation information (Chrome 9 implements RFC 5987, IE 691 9 RC implements it for UTF-8 only). 693 Clarify who requirements are on, add a section discussing conformance 694 and handling of invalid field values in general. 696 Closed issues: 698 o : "avoid 699 stating ISO-8859-1 default for header param" (the default is still 700 mentioned, but it was clarified what it applies to). 702 o : "Path 703 Separator Characters" 705 E.10. Since draft-ietf-httpbis-content-disp-05 707 Editorial changes: Fixed two typos where the new Conformance section 708 said "Content-Location" instead of "Content-Disposition". Cleaned up 709 terminology ("user agent", "recipient", "sender", "message body", 710 ...). Stated what the escape character for quoted-string is. 711 Explained a use case for "inline" disposition type. Updated 712 implementation notes with respect to the fallback behavior. 714 Added appendix "Advice on Generating Content-Disposition Header 715 Fields". 717 E.11. Since draft-ietf-httpbis-content-disp-06 719 Closed issues: 721 o : 722 "conformance language" 724 E.12. Since draft-ietf-httpbis-content-disp-07 726 Rephrase the requirement about well-known file system locations, and 727 also clarify that by "last path segment" we mean the actual filename. 728 Added a forward reference from "invalid" to the section that defines 729 a valid header field. 731 Index 733 C 734 Content-Disposition header field 5 736 H 737 Header Fields 738 Content-Disposition 5 740 Author's Address 742 Julian F. Reschke 743 greenbytes GmbH 744 Hafenweg 16 745 Muenster, NW 48155 746 Germany 748 EMail: julian.reschke@greenbytes.de 749 URI: http://greenbytes.de/tech/webdav/