Network Working Group J. Reschke Internet-Draft greenbytes Intended status: Standards Track May 10, 2014 Expires: November 11, 2014 Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding draft-reschke-http-cice-00 Abstract In HTTP, "Content Codings" allow for payload encodings such as for compression or integrity checks. In particular, the "gzip" content coding is widely used for payload data sent in response messages. Content Codings can be used in request messages as well, however discoverability is not on par with response messages. This document extends the HTTP "Accept-Encoding" header field for use in responses. Editorial Note (To be removed by RFC Editor before publication) Distribution of this document is unlimited. Although this is not a work item of the HTTPbis Working Group, comments should be sent to the Hypertext Transfer Protocol (HTTP) mailing list at ietf-http-wg@w3.org [1], which may be joined by sending a message with subject "subscribe" to ietf-http-wg-request@w3.org [2]. Discussions of the HTTPbis Working Group are archived at . XML versions, latest edits, and the issues list for this document are available from . Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." Reschke Expires November 11, 2014 [Page 1] Internet-Draft HTTP CICE May 2014 This Internet-Draft will expire on November 11, 2014. Copyright Notice Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 3. Extensions to 'Accept-Encoding' Header Field . . . . . . . . . 3 4. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 4 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7.1. Normative References . . . . . . . . . . . . . . . . . . . 5 7.2. Informative References . . . . . . . . . . . . . . . . . . 5 Appendix A. Open issues (to be removed by RFC Editor prior to publication) . . . . . . . . . . . . . . . . . . . . . 5 A.1. edit . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Reschke Expires November 11, 2014 [Page 2] Internet-Draft HTTP CICE May 2014 1. Introduction In HTTP, "Content Codings" allow for payload encodings such as for compression or integrity checks ([HTTPSEM], Section 3.1.2). In particular, the "gzip" content coding is widely used for payload data sent in response messages. Content Codings can be used in request messages as well, however discoverability is not on par with response messages. This document extends the HTTP "Accept-Encoding" header field ([HTTPSEM], Section 5.3.4) for use in responses. 2. Notational Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. This document reuses terminology used in the base HTTP specifications, namely Section 2 of [HTTPMSG] and Section 3.1.2 of [HTTPSEM]. 3. Extensions to 'Accept-Encoding' Header Field Section 5.3.4 of [HTTPSEM] defines "Accept-Encoding" as a request header field only. This specification extends that definition to allow "Accept-Encoding" as response header field as well. When present, it indicates what content codings a server is willing to accept in requests. In particular, a field value that contains "identity" only implies that no content codings are supported at all. Note that this information applies to the resource to which the request was addressed. The set of supported encodings might vary for different resources on the same server, and could also vary depending on other aspects of the request (such as the request method). Section 6.5.13 of [HTTPSEM] defines status code 415 (Unsupported Media Type) to apply to both media type and content coding related problems. Servers that fail a request due to an unsupported content coding SHOULD respond with a 415 status and SHOULD include an "Accept- Encoding" header in that response, allowing clients to distinguish between content coding related issues and media type related issues. Reschke Expires November 11, 2014 [Page 3] Internet-Draft HTTP CICE May 2014 4. Example Client submits a POST request using Content-Encoding "compress" ([HTTPSEM], Section 3.1.2.1): POST /edit/ HTTP/1.1 Host: example.org Content-Type: application/atom+xml;type=entry Content-Encoding: compress ...compressed payload... Server rejects request because it only allows the "gzip" content coding: HTTP/1.1 415 Unsupported Media Type Date: Fri, 09 May 2014 11:43:53 GMT Accept-Encoding: gzip Content-Length: 68 Content-Type: text/plain This resource only supports the "gzip" content coding in requests. ...at which point the client can retry the request with the supported "gzip" content coding. Alternatively, a server that does not support any content codings in requests could answer with: HTTP/1.1 415 Unsupported Media Type Date: Fri, 09 May 2014 11:43:53 GMT Accept-Encoding: identity Content-Length: 61 Content-Type: text/plain This resource does not support content codings in requests. 5. Security Considerations This specification does not introduce any new security considerations beyond those discussed in Section 9 of [HTTPSEM]. 6. IANA Considerations HTTP header fields are registered within the "Message Headers" registry located at , as defined by [BCP90]. Reschke Expires November 11, 2014 [Page 4] Internet-Draft HTTP CICE May 2014 This document updates the definition of the "Accept-Encoding" header field, so the "Permanent Message Header Field Names" registry shall be updated accordingly: +-----------------+----------+----------+---------------------------+ | Header Field | Protocol | Status | Reference | | Name | | | | +-----------------+----------+----------+---------------------------+ | Accept-Encoding | http | standard | [HTTPSEM], Section 5.3.4, | | | | | extended by Section 3 of | | | | | this document | +-----------------+----------+----------+---------------------------+ 7. References 7.1. Normative References [HTTPMSG] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", draft-ietf-httpbis-p1-messaging-26 (work in progress), February 2014. [HTTPSEM] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", draft-ietf-httpbis-p2-semantics-26 (work in progress), February 2014. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. 7.2. Informative References [BCP90] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, September 2004. URIs [1] [2] Appendix A. Open issues (to be removed by RFC Editor prior to publication) Reschke Expires November 11, 2014 [Page 5] Internet-Draft HTTP CICE May 2014 A.1. edit Type: edit julian.reschke@greenbytes.de (2011-04-15): Umbrella issue for editorial fixes/enhancements. Author's Address Julian F. Reschke greenbytes GmbH Hafenweg 16 Muenster, NW 48155 Germany EMail: julian.reschke@greenbytes.de URI: http://greenbytes.de/tech/webdav/ Reschke Expires November 11, 2014 [Page 6]