idnits 2.17.1 draft-reschke-http-cice-02.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 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 and authors Copyright Line does not match the current year -- The document date (March 9, 2015) is 3328 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) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). 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 March 9, 2015 5 Expires: September 10, 2015 7 Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding 8 draft-reschke-http-cice-02 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. 20 Editorial Note (To be removed by RFC Editor before publication) 22 Distribution of this document is unlimited. Although this is not a 23 work item of the HTTPbis Working Group, comments should be sent to 24 the Hypertext Transfer Protocol (HTTP) mailing list at 25 ietf-http-wg@w3.org [1], which may be joined by sending a message 26 with subject "subscribe" to ietf-http-wg-request@w3.org [2]. 28 Discussions of the HTTPbis Working Group are archived at 29 . 31 XML versions and latest edits for this document are available from 32 . 34 The changes in this draft are summarized in Appendix A.2. 36 Status of This Memo 38 This Internet-Draft is submitted in full conformance with the 39 provisions of BCP 78 and BCP 79. 41 Internet-Drafts are working documents of the Internet Engineering 42 Task Force (IETF). Note that other groups may also distribute 43 working documents as Internet-Drafts. The list of current Internet- 44 Drafts is at http://datatracker.ietf.org/drafts/current/. 46 Internet-Drafts are draft documents valid for a maximum of six months 47 and may be updated, replaced, or obsoleted by other documents at any 48 time. It is inappropriate to use Internet-Drafts as reference 49 material or to cite them other than as "work in progress." 51 This Internet-Draft will expire on September 10, 2015. 53 Copyright Notice 55 Copyright (c) 2015 IETF Trust and the persons identified as the 56 document authors. All rights reserved. 58 This document is subject to BCP 78 and the IETF Trust's Legal 59 Provisions Relating to IETF Documents 60 (http://trustee.ietf.org/license-info) in effect on the date of 61 publication of this document. Please review these documents 62 carefully, as they describe your rights and restrictions with respect 63 to this document. Code Components extracted from this document must 64 include Simplified BSD License text as described in Section 4.e of 65 the Trust Legal Provisions and are provided without warranty as 66 described in the Simplified BSD License. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 71 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 72 3. Extensions to 'Accept-Encoding' Header Field . . . . . . . . . 3 73 4. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 74 5. Deployment Considerations . . . . . . . . . . . . . . . . . . . 5 75 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 5 76 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 77 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 5 78 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 79 9.1. Normative References . . . . . . . . . . . . . . . . . . . 6 80 9.2. Informative References . . . . . . . . . . . . . . . . . . 6 81 Appendix A. Change Log (to be removed by RFC Editor before 82 publication) . . . . . . . . . . . . . . . . . . . . . 6 83 A.1. draft-reschke-http-cice-00 . . . . . . . . . . . . . . . . 6 84 A.2. draft-reschke-http-cice-01 . . . . . . . . . . . . . . . . 6 86 1. Introduction 88 In HTTP, "Content Codings" allow for payload encodings such as for 89 compression or integrity checks ([RFC7231], Section 3.1.2). In 90 particular, the "gzip" content coding is widely used for payload data 91 sent in response messages. 93 Content Codings can be used in request messages as well, however 94 discoverability is not on par with response messages. This document 95 extends the HTTP "Accept-Encoding" header field ([RFC7231], Section 96 5.3.4) for use in responses. 98 2. Notational Conventions 100 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 101 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 102 document are to be interpreted as described in [RFC2119]. 104 This document reuses terminology used in the base HTTP 105 specifications, namely Section 2 of [RFC7230] and Section 3.1.2 of 106 [RFC7231]. 108 3. Extensions to 'Accept-Encoding' Header Field 110 Section 5.3.4 of [RFC7231] defines "Accept-Encoding" as a request 111 header field only. 113 This specification extends that definition to allow "Accept-Encoding" 114 as a response header field as well. When present, it indicates what 115 content codings a resource was willing to accept at the time of the 116 response. A field value that only contains "identity" implies that 117 no content codings are supported. 119 Note that this information is specific to the specific request. The 120 set of supported encodings might be different for other resources on 121 the same server, could also change depending on other aspects of the 122 request (such as the request method), or might change in the future. 124 Section 6.5.13 of [RFC7231] defines status code 415 (Unsupported 125 Media Type) to apply to both media type and content coding related 126 problems. 128 Servers that fail a request due to an unsupported content coding 129 SHOULD respond with a 415 status and SHOULD include an "Accept- 130 Encoding" header field in that response, allowing clients to 131 distinguish between content coding related issues and media type 132 related issues. In order to avoid confusion with media type related 133 problems, servers that fail a request with a 415 status for reasons 134 unrelated to content codings SHOULD NOT include the "Accept-Encoding" 135 header field. 137 While sending "Accept-Encoding" in a 415 (Unsupported Media Type) 138 response will be the most common use case, it is not restricted to 139 this particular status code. For instance, a server might include it 140 in a 2xx response when a request payload was big enough to justity 141 use of a compression coding, but the client failed to do so. 143 4. Example 145 Client submits a POST request using Content-Encoding "compress" 146 ([RFC7231], Section 3.1.2.1): 148 POST /edit/ HTTP/1.1 149 Host: example.org 150 Content-Type: application/atom+xml;type=entry 151 Content-Encoding: compress 153 ...compressed payload... 155 Server rejects request because it only allows the "gzip" content 156 coding: 158 HTTP/1.1 415 Unsupported Media Type 159 Date: Fri, 09 May 2014 11:43:53 GMT 160 Accept-Encoding: gzip 161 Content-Length: 68 162 Content-Type: text/plain 164 This resource only supports the "gzip" content coding in requests. 166 ...at which point the client can retry the request with the supported 167 "gzip" content coding. 169 Alternatively, a server that does not support any content codings in 170 requests could answer with: 172 HTTP/1.1 415 Unsupported Media Type 173 Date: Fri, 09 May 2014 11:43:53 GMT 174 Accept-Encoding: identity 175 Content-Length: 61 176 Content-Type: text/plain 178 This resource does not support content codings in requests. 180 5. Deployment Considerations 182 Servers that do not support content codings in requests already are 183 required to fail a request that does use a content coding. Section 184 6.5.13 of [RFC7231] recommends to use the status code 415 185 (Unsupported Media Type), so the only change needed is to include the 186 "Accept-Encoding" header field with value "identity" in that 187 response. 189 Servers that do support some content codings are required to fail 190 requests with unsupported content codings as well. To be compliant 191 with this specification, servers will need to use the status code 415 192 (Unsupported Media Type) to signal the problem, and will have to 193 include an "Accept-Encoding" header field that enumerates the content 194 codings that are supported. As the set of supported content codings 195 usually is static and small, adding the header field ought to be 196 trivial. 198 6. Security Considerations 200 This specification does not introduce any new security considerations 201 beyond those discussed in Section 9 of [RFC7231]. 203 7. IANA Considerations 205 HTTP header fields are registered within the "Message Headers" 206 registry located at 207 , as defined by 208 [BCP90]. 210 This document updates the definition of the "Accept-Encoding" header 211 field, so the "Permanent Message Header Field Names" registry shall 212 be updated accordingly: 214 +-----------------+----------+----------+---------------------------+ 215 | Header Field | Protocol | Status | Reference | 216 | Name | | | | 217 +-----------------+----------+----------+---------------------------+ 218 | Accept-Encoding | http | standard | [RFC7231], Section 5.3.4, | 219 | | | | extended by Section 3 of | 220 | | | | this document | 221 +-----------------+----------+----------+---------------------------+ 223 8. Acknowledgements 225 Thanks go to the members of the and HTTPbis Working Group, namely 226 Amos Jeffries, Mark Nottingham, and Ted Hardie. 228 9. References 230 9.1. Normative References 232 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 233 Requirement Levels", BCP 14, RFC 2119, March 1997. 235 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 236 Protocol (HTTP/1.1): Message Syntax and Routing", 237 RFC 7230, June 2014. 239 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 240 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 241 June 2014. 243 9.2. Informative References 245 [BCP90] Klyne, G., Nottingham, M., and J. Mogul, "Registration 246 Procedures for Message Header Fields", BCP 90, RFC 3864, 247 September 2004. 249 URIs 251 [1] 253 [2] 255 Appendix A. Change Log (to be removed by RFC Editor before publication) 257 A.1. draft-reschke-http-cice-00 259 Clarified that the information returned in Accept-Encoding is per 260 resource, not per server. 262 Added some deployment considerations. 264 Updated HTTP/1.1 references. 266 A.2. draft-reschke-http-cice-01 268 Restrict the scope of A-E from "future requests" to "at the time of 269 this request". 271 Mention use of A-E in responses other than 415. 273 Recommend not to include A-E in a 415 response unless there was 274 actually a problem related to content coding. 276 Author's Address 278 Julian F. Reschke 279 greenbytes GmbH 280 Hafenweg 16 281 Muenster, NW 48155 282 Germany 284 EMail: julian.reschke@greenbytes.de 285 URI: http://greenbytes.de/tech/webdav/