idnits 2.17.1 draft-reschke-rfc2231-in-http-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 365. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 376. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 383. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 389. 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 abstract seems to contain references ([2], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year -- 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 (August 15, 2008) is 5732 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 4646 (Obsoleted by RFC 5646) Summary: 4 errors (**), 0 flaws (~~), 1 warning (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Reschke 3 Internet-Draft greenbytes 4 Intended status: Standards Track August 15, 2008 5 Expires: February 16, 2009 7 Applicability of RFC 2231 Encoding to 8 Hypertext Transfer Protocol (HTTP) Headers 9 draft-reschke-rfc2231-in-http-00 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that any 14 applicable patent or other IPR claims of which he or she is aware 15 have been or will be disclosed, and any of which he or she becomes 16 aware will be disclosed, in accordance with Section 6 of BCP 79. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on February 16, 2009. 36 Abstract 38 By default, message header parameters in Hypertext Transfer Protocol 39 (HTTP) messages can not carry characters outside the ISO-8859-1 40 character set. RFC 2231 defines an escaping mechanism for use in 41 Multipurpose Internet Mail Extensions (MIME) headers. This document 42 specifies a profile of that encoding suitable for use in HTTP. 44 Editorial Note (To be removed by RFC Editor before publication) 46 There are multiple HTTP headers that already use RFC 2231 encoding in 47 practice (Content-Disposition) or might use it in the future (Link). 48 The purpose of this document is to provide a single place where the 49 generic aspects of RFC 2231 encoding in HTTP headers are defined. 51 Distribution of this document is unlimited. Although this is not a 52 work item of the HTTPbis Working Group, comments should be sent to 53 the Hypertext Transfer Protocol (HTTP) mailing list at 54 ietf-http-wg@w3.org [1], which may be joined by sending a message 55 with subject "subscribe" to ietf-http-wg-request@w3.org [2]. 57 Discussions of the HTTPbis Working Group are archived at 58 . 60 XML versions, latest edits and the issues list for this document are 61 available from 62 . 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 67 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 68 3. A Profile of RFC 2231 for Use in HTTP . . . . . . . . . . . . 3 69 3.1. Parameter Continuations . . . . . . . . . . . . . . . . . 4 70 3.2. Parameter Value Character Set and Language Information . . 4 71 3.2.1. Examples . . . . . . . . . . . . . . . . . . . . . . . 5 72 3.3. Language specification in Encoded Words . . . . . . . . . 6 73 4. Guidelines for Usage in HTTP Header Definitions . . . . . . . 6 74 4.1. When to Use the Extension . . . . . . . . . . . . . . . . 6 75 4.2. Error Handling . . . . . . . . . . . . . . . . . . . . . . 7 76 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 77 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 78 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 79 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 80 8.1. Normative References . . . . . . . . . . . . . . . . . . . 7 81 8.2. Informative References . . . . . . . . . . . . . . . . . . 8 82 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 8 83 Intellectual Property and Copyright Statements . . . . . . . . . . 10 85 1. Introduction 87 By default, message header parameters in HTTP ([RFC2616]) messages 88 can not carry characters outside the ISO-8859-1 character set 89 ([ISO-8859-1]). RFC 2231 ([RFC2231]) defines an escaping mechanism 90 for use in MIME headers. This document specifies a profile of that 91 encoding for use in HTTP. 93 2. Notational Conventions 95 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 96 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 97 document are to be interpreted as described in [RFC2119]. 99 This specification uses the augmented BNF notation defined in Section 100 2.1 of [RFC2616], including its rules for linear whitespace (LWS). 101 [[LWS: This needs to be checked.]] 103 Non-ASCII characters used in prose for examples are encoded using the 104 format "Backslash-U with Delimiters", defined in Section 5.1 of 105 [RFC5137]. 107 Note that this specification uses the term "character set" for 108 consistency with other IETF specifications such as RFC 2277 (see 109 [RFC2277], Section 3). A more accurate term would be "character 110 encoding" (a mapping of code points to octet sequences). 112 3. A Profile of RFC 2231 for Use in HTTP 114 RFC 2231 defines several extensions to MIME. The sections below 115 discuss if and how they apply to HTTP. 117 In short: 119 o Parameter Continuations aren't needed (Section 3.1), 121 o Character Set and Language Information are useful, therefore a 122 simple subset is specified (Section 3.2), and 124 o Language Specifications in Encoded Words aren't needed 125 (Section 3.3). 127 3.1. Parameter Continuations 129 Section 3 of [RFC2231] defines a mechanism that deals with the length 130 limitations that apply to MIME headers. These limitations do not 131 apply to HTTP ([RFC2616], Section 19.4.7). 133 Thus in HTTP, senders MUST NOT use parameter continuations, and 134 therefore recipients do not need to support them. 136 3.2. Parameter Value Character Set and Language Information 138 Section 4 of [RFC2231] specifies how to embed language information 139 into parameter values, and also how to encode non-ASCII characters, 140 dealing with restrictions both in MIME and HTTP header parameters. 142 However, RFC 2231 does not specify mandatory-to-implement character 143 encoding, making it hard for senders to decide which character set to 144 use. Thus, recipients implementing this specification MUST support 145 the character sets "ISO-8859-1" [ISO-8859-1] and "UTF-8" [RFC3629]. 147 Furthermore, RFC 2231 allows leaving out the character encoding 148 information. The profile defined by this specification does not 149 allow that. 151 The syntax for parameters is defined in Section 3.6 of [RFC2616]: 153 parameter = attribute "=" value 155 attribute = token 156 value = token | quoted-string 158 quoted-string = 159 token = 161 This specification extends the grammar to: 163 parameter = reg-parameter | ext-parameter 165 reg-parameter = attribute "=" value 166 ext-parameter = attribute "*=" ext-value 168 ext-value = charset "'" [ language ] "'" value-chars 170 charset = "UTF-8" | "ISO-8859-1" | ext-charset 171 ; NOTE: case-insensitive 173 ext-charset = token ; see IANA charset registry 174 ; () 176 language = 178 value-chars = *( pct-encoded | attr-char ) 180 pct-encoded = "%" HEXDIG HEXDIG 182 attr-char = ALPHA | DIGIT 183 | "-" | "." | "_" | "~" | ":" 184 | "!" | "$" | "&" | "+" 186 ALPHA = %x41-5A | %x61-7A 187 ; A-Z | a-z 188 DIGIT = %x30-39 189 ; any US-ASCII digit "0".."9" 190 HEXDIG = DIGIT | "A" | "B" | "C" | "D" | "E" | "F" 191 ; NOTE: case-insensitive 193 3.2.1. Examples 195 Non-extended notation, using "token": 197 foo: bar; title=Economy 199 Non-extended notation, using "quoted-string": 201 foo: bar; title="US-$ rates" 203 Extended notation, using the unicode character \u'00A3' (POUND SIGN): 205 foo: bar; title*=iso-8859-1'en'%A3%20rates 207 Note: the Unicode pound sign character \u'00A3' was encoded using 208 ISO-8859-1 into the single octet A3, then percent-encoded. Also note 209 that the space character was encoded as %20, as attr-char does not 210 contain it. 212 Extended notation, using the unicode characters \u'00A3' (POUND SIGN) 213 and \u'20AC' (EURO SIGN): 215 foo: bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates 217 Note: the unicode pound sign character \u'00A3' was encoded using 218 UTF-8 into the octet sequence C2 A3, then percent-encoded. Likewise, 219 the unicode euro sign character \u'20AC' was encoded into the octet 220 sequence E2 82 AC, then percent-encoded. Also note that HEXDIG 221 allows both lower-case and upper-case character, so recipients must 222 understand both, and that the language information is optional, while 223 the character set is not. 225 3.3. Language specification in Encoded Words 227 Section 5 of [RFC2231] extends the encoding defined in [RFC2047] to 228 also support language specification in encoded words. Although the 229 HTTP/1.1 does refer to RFC 2047 ([RFC2616], Section 2.2), it's not 230 clear to which header field exactly it applies, and whether it is 231 implemented in practice (see 232 for details). 234 Thus, the RFC 2231 profile defined by this specification does not 235 include this feature. 237 4. Guidelines for Usage in HTTP Header Definitions 239 Specifications of HTTP headers that use the extensions defined in 240 Section 3.2 should clearly state that. The best way to achieve this 241 is to normatively reference this specification, and to include the 242 ext-parameter production into the ABNF for that header. 244 4.1. When to Use the Extension 246 Section 4.2 of [RFC2277] requires that protocol elements containing 247 text can carry language information. Thus, the ext-parameter 248 production should always be used when the parameter value is of 249 textual nature. 251 Furthermore, the extension should also be used whenever the parameter 252 value needs to carry characters not present in the US-ASCII 253 ([USASCII]) character set (note that it would be unacceptable to 254 define a new header that would be restricted to a subset of the 255 Unicode character set). 257 4.2. Error Handling 259 Header specifications that include parameters should also specify 260 whether same-named parameters can occur multiple times. If 261 repetitions are not allowed (and this is believed to be the common 262 case), the specification should state whether regular or the extended 263 syntax takes precedence. In the latter case, this could be used by 264 senders to use both formats without breaking recipients that do not 265 understand the syntax. 267 Example: 269 foo: bar; title="EURO exchange rates"; 270 title*=utf-8''%e2%82%ac%20exchange%20rates 272 In this case, the sender provides an ASCII version of the title for 273 legacy recipient, but also includes an internationalized version for 274 recipients understanding this specification -- the latter obviously 275 should prefer the new syntax over the old one. 277 5. Security Considerations 279 This document does not discuss security issues and is not believed to 280 raise any security issues not already endemic in HTTP. 282 6. IANA Considerations 284 There are no IANA Considerations related to this specification. 286 7. Acknowledgements 288 Thanks to Frank Ellermann for help figuring out BNF details. 290 8. References 292 8.1. Normative References 294 [ISO-8859-1] 295 International Organization for Standardization, 296 "Information technology -- 8-bit single-byte coded graphic 297 character sets -- Part 1: Latin alphabet No. 1", ISO/ 298 IEC 8859-1:1998, 1998. 300 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 301 Requirement Levels", BCP 14, RFC 2119, March 1997. 303 [RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and Encoded 304 Word Extensions: 305 Character Sets, Languages, and Continuations", RFC 2231, 306 November 1997. 308 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 309 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 310 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 312 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 313 10646", RFC 3629, STD 63, November 2003. 315 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 316 Languages", BCP 47, RFC 4646, September 2006. 318 8.2. Informative References 320 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) 321 Part Three: Message Header Extensions for Non-ASCII Text", 322 RFC 2047, November 1996. 324 [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and 325 Languages", BCP 18, RFC 2277, January 1998. 327 [RFC5137] Klensin, J., "ASCII Escaping of Unicode Characters", 328 BCP 137, RFC 5137, February 2008. 330 [USASCII] American National Standards Institute, "Coded Character 331 Set -- 7-bit American Standard Code for Information 332 Interchange", ANSI X3.4, 1986. 334 URIs 336 [1] 338 [2] 340 Author's Address 342 Julian F. Reschke 343 greenbytes GmbH 344 Hafenweg 16 345 Muenster, NW 48155 346 Germany 348 Email: julian.reschke@greenbytes.de 349 URI: http://greenbytes.de/tech/webdav/ 351 Full Copyright Statement 353 Copyright (C) The IETF Trust (2008). 355 This document is subject to the rights, licenses and restrictions 356 contained in BCP 78, and except as set forth therein, the authors 357 retain all their rights. 359 This document and the information contained herein are provided on an 360 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 361 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 362 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 363 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 364 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 365 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 367 Intellectual Property 369 The IETF takes no position regarding the validity or scope of any 370 Intellectual Property Rights or other rights that might be claimed to 371 pertain to the implementation or use of the technology described in 372 this document or the extent to which any license under such rights 373 might or might not be available; nor does it represent that it has 374 made any independent effort to identify any such rights. Information 375 on the procedures with respect to rights in RFC documents can be 376 found in BCP 78 and BCP 79. 378 Copies of IPR disclosures made to the IETF Secretariat and any 379 assurances of licenses to be made available, or the result of an 380 attempt made to obtain a general license or permission for the use of 381 such proprietary rights by implementers or users of this 382 specification can be obtained from the IETF on-line IPR repository at 383 http://www.ietf.org/ipr. 385 The IETF invites any interested party to bring to its attention any 386 copyrights, patents or patent applications, or other proprietary 387 rights that may cover technology that may be required to implement 388 this standard. Please address the information to the IETF at 389 ietf-ipr@ietf.org.