idnits 2.17.1 draft-ietf-httpbis-cice-03.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 8, 2015) is 3153 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) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7540 (Obsoleted by RFC 9113) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTP Working Group J. Reschke 3 Internet-Draft greenbytes 4 Intended status: Standards Track September 8, 2015 5 Expires: March 11, 2016 7 Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding 8 draft-ietf-httpbis-cice-03 10 Abstract 12 In HTTP, content codings allow for payload encodings such as for 13 compression or integrity checks. In particular, the "gzip" content 14 coding is widely used for payload data sent in response messages. 16 Content codings can be used in request messages as well, however 17 discoverability is not on par with response messages. This document 18 extends the HTTP "Accept-Encoding" header field for use in responses, 19 to indicate the content codings that are supported in requests. 21 Editorial Note (To be removed by RFC Editor before publication) 23 Discussion of this draft takes place on the HTTPBIS working group 24 mailing list (ietf-http-wg@w3.org), which is archived at 25 . 27 Working Group information can be found at 28 and ; 29 source code and issues list for this draft can be found at 30 . 32 The changes in this draft are summarized in Appendix A.6. 34 Status of This Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at http://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on March 11, 2016. 50 Copyright Notice 52 Copyright (c) 2015 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (http://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 68 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 69 3. Using the 'Accept-Encoding' Header Field in Responses . . . . . 3 70 4. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 71 5. Deployment Considerations . . . . . . . . . . . . . . . . . . . 5 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 5 73 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 74 7.1. Header Field Registry . . . . . . . . . . . . . . . . . . . 5 75 7.2. Status Code Registry . . . . . . . . . . . . . . . . . . . 6 76 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 77 8.1. Normative References . . . . . . . . . . . . . . . . . . . 6 78 8.2. Informative References . . . . . . . . . . . . . . . . . . 7 79 Appendix A. Change Log (to be removed by RFC Editor before 80 publication) . . . . . . . . . . . . . . . . . . . . . 7 81 A.1. Since draft-reschke-http-cice-00 . . . . . . . . . . . . . 7 82 A.2. Since draft-reschke-http-cice-01 . . . . . . . . . . . . . 7 83 A.3. Since draft-reschke-http-cice-02 . . . . . . . . . . . . . 7 84 A.4. Since draft-ietf-httpbis-cice-00 . . . . . . . . . . . . . 7 85 A.5. Since draft-ietf-httpbis-cice-01 . . . . . . . . . . . . . 8 86 A.6. Since draft-ietf-httpbis-cice-02 . . . . . . . . . . . . . 8 87 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . . 8 89 1. Introduction 91 In HTTP, content codings allow for payload encodings such as for 92 compression or integrity checks ([RFC7231], Section 3.1.2). In 93 particular, the "gzip" content coding ([RFC7230], Section 4.2) is 94 widely used for payload data sent in response messages. 96 Content codings can be used in request messages as well, however 97 discoverability is not on par with response messages. This document 98 extends the HTTP "Accept-Encoding" header field ([RFC7231], Section 99 5.3.4) for use in responses, to indicate the content codings that are 100 supported in requests. It furthermore updates the definition of 101 status code 415 (Unsupported Media Type) ([RFC7231], Section 6.5.13), 102 recommending to include the "Accept-Encoding" header field when 103 appropriate. 105 2. Notational Conventions 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 109 document are to be interpreted as described in [RFC2119]. 111 This document reuses terminology defined in the base HTTP 112 specifications, namely Section 2 of [RFC7230] and Section 3.1.2 of 113 [RFC7231]. 115 3. Using the 'Accept-Encoding' Header Field in Responses 117 Section 5.3.4 of [RFC7231] defines "Accept-Encoding" as a request 118 header field only. 120 This specification expands that definition to allow "Accept-Encoding" 121 as a response header field as well. When present in a response, it 122 indicates what content codings the resource was willing to accept in 123 the associated request. A field value that only contains "identity" 124 implies that no content codings were supported. 126 Note that this information is specific to the associated request; the 127 set of supported encodings might be different for other resources on 128 the same server, and could change over time or depend on other 129 aspects of the request (such as the request method). 131 Section 6.5.13 of [RFC7231] defines status code 415 (Unsupported 132 Media Type) to apply to both media type and content coding related 133 problems. 135 Servers that fail a request due to an unsupported content coding 136 ought to respond with a 415 status and ought to include an "Accept- 137 Encoding" header field in that response, allowing clients to 138 distinguish between content coding related issues and media type 139 related issues. In order to avoid confusion with media type related 140 problems, servers that fail a request with a 415 status for reasons 141 unrelated to content codings MUST NOT include the "Accept-Encoding" 142 header field. 144 It is expected that the most common use of "Accept-Encoding" in 145 responses will have the 415 (Unsupported Media Type) status code, in 146 response to optimistic use of a content coding by clients. However, 147 the header field can also be used to indicate to clients that content 148 codings are supported, to optimize future interactions. For example, 149 a resource might include it in a 2xx response when the request 150 payload was big enough to justify use of a compression coding, but 151 the client failed do so. 153 4. Example 155 A client submits a POST request using the "compress" content coding 156 ([RFC7231], Section 3.1.2.1): 158 POST /edit/ HTTP/1.1 159 Host: example.org 160 Content-Type: application/atom+xml;type=entry 161 Content-Encoding: compress 163 ...compressed payload... 165 The server rejects request because it only allows the "gzip" content 166 coding: 168 HTTP/1.1 415 Unsupported Media Type 169 Date: Fri, 09 May 2014 11:43:53 GMT 170 Accept-Encoding: gzip 171 Content-Length: 68 172 Content-Type: text/plain 174 This resource only supports the "gzip" content coding in requests. 176 ...at which point the client can retry the request with the supported 177 "gzip" content coding. 179 Alternatively, a server that does not support any content codings in 180 requests could answer with: 182 HTTP/1.1 415 Unsupported Media Type 183 Date: Fri, 09 May 2014 11:43:53 GMT 184 Accept-Encoding: identity 185 Content-Length: 61 186 Content-Type: text/plain 188 This resource does not support content codings in requests. 190 5. Deployment Considerations 192 Servers that do not support content codings in requests already are 193 required to fail a request that uses a content coding. Section 194 6.5.13 of [RFC7231] defines the status code 415 (Unsupported Media 195 Type) for this purpose, so the only change needed is to include the 196 "Accept-Encoding" header field with value "identity" in that 197 response. 199 Servers that do support some content codings are required to fail 200 requests with unsupported content codings as well. To be compliant 201 with this specification, servers will need to use the status code 415 202 (Unsupported Media Type) to signal the problem, and will have to 203 include an "Accept-Encoding" header field that enumerates the content 204 codings that are supported. As the set of supported content codings 205 is usually static and small, adding the header field ought to be 206 trivial. 208 6. Security Considerations 210 This specification only adds discovery of supported content codings 211 and diagnostics for requests failing due to unsupported content 212 codings. As such, it doesn't introduce any new security 213 considerations over those already present in HTTP/1.1 (Section 9 of 214 [RFC7231]) and HTTP/2 (Section 10 of [RFC7540]). 216 However, the point of better discoverability and diagnostics is to 217 make it easier to use content codings in requests. This might lead 218 to increased usage of compression codings such as gzip (Section 4.2 219 of [RFC7230]), which, when used over a secure channel, can enable 220 side-channel attacks such as BREACH (see Section 10.6 of [RFC7540] 221 and [BREACH]). At the time of publication, it was unclear how 222 BREACH-like attacks can be applied to compression in HTTP requests. 224 7. IANA Considerations 226 7.1. Header Field Registry 228 HTTP header fields are registered within the "Message Headers" 229 registry located at 230 , as defined by 231 [BCP90]. 233 This document updates the definition of the "Accept-Encoding" header 234 field, so the "Permanent Message Header Field Names" registry ought 235 to be updated accordingly: 237 +-----------------+----------+----------+---------------------------+ 238 | Header Field | Protocol | Status | Reference | 239 | Name | | | | 240 +-----------------+----------+----------+---------------------------+ 241 | Accept-Encoding | http | standard | [RFC7231], Section 5.3.4, | 242 | | | | and Section 3 of this | 243 | | | | document | 244 +-----------------+----------+----------+---------------------------+ 246 7.2. Status Code Registry 248 HTTP status codes are registered within the "Status Code" registry 249 located at . 251 This document updates the definition of the status code 415 252 (Unsupported Media Type), so the "Status Code" registry ought to be 253 updated accordingly: 255 +-------+------------------+----------------------------------------+ 256 | Value | Description | Reference | 257 +-------+------------------+----------------------------------------+ 258 | 415 | Unsupported | [RFC7231], Section 6.5.13, and | 259 | | Media Type | Section 3 of this document | 260 +-------+------------------+----------------------------------------+ 262 8. References 264 8.1. Normative References 266 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 267 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 268 RFC2119, March 1997, 269 . 271 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 272 Protocol (HTTP/1.1): Message Syntax and Routing", 273 RFC 7230, DOI 10.17487/RFC7230, June 2014, 274 . 276 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 277 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 278 DOI 10.17487/RFC7231, June 2014, 279 . 281 8.2. Informative References 283 [BCP90] Klyne, G., Nottingham, M., and J. Mogul, "Registration 284 Procedures for Message Header Fields", BCP 90, RFC 3864, 285 September 2004, . 287 [BREACH] Gluck, Y., Harris, N., and A. Prado, "BREACH: Reviving the 288 CRIME Attack", July 2013, . 292 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 293 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 294 DOI 10.17487/RFC7540, May 2015, 295 . 297 Appendix A. Change Log (to be removed by RFC Editor before publication) 299 A.1. Since draft-reschke-http-cice-00 301 Clarified that the information returned in Accept-Encoding is per 302 resource, not per server. 304 Added some deployment considerations. 306 Updated HTTP/1.1 references. 308 A.2. Since draft-reschke-http-cice-01 310 Restrict the scope of A-E from "future requests" to "at the time of 311 this request". 313 Mention use of A-E in responses other than 415. 315 Recommend not to include A-E in a 415 response unless there was 316 actually a problem related to content coding. 318 A.3. Since draft-reschke-http-cice-02 320 First Working Group draft; updated boilerplate accordingly. 322 A.4. Since draft-ietf-httpbis-cice-00 324 Apply editorial improvements suggested by Mark Nottingham. 326 A.5. Since draft-ietf-httpbis-cice-01 328 Clarify that we're also extending the definition of status code 415 329 (so update that IANA registry entry as well). 331 A.6. Since draft-ietf-httpbis-cice-02 333 Removed normative language that required used of Accept-Encoding in 334 responses (which would have made existing servers non-compliant). 336 Add BREACH like attacks to security considerations 337 (). 339 Appendix B. Acknowledgements 341 Thanks go to the members of the and HTTPbis Working Group, namely 342 Amos Jeffries, Ben Campbell, Mark Nottingham, Pete Resnick, Stephen 343 Farrell, and Ted Hardie. 345 Author's Address 347 Julian F. Reschke 348 greenbytes GmbH 349 Hafenweg 16 350 Muenster, NW 48155 351 Germany 353 EMail: julian.reschke@greenbytes.de 354 URI: http://greenbytes.de/tech/webdav/