Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding
RFC 7694
Internet Engineering Task Force (IETF) J. Reschke
Request for Comments: 7694 greenbytes
Category: Standards Track November 2015
ISSN: 2070-1721
Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding
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,
to indicate the content codings that are supported in requests.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7694.
Copyright Notice
Copyright (c) 2015 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.
Reschke Standards Track [Page 1]
RFC 7694 HTTP CICE November 2015
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 2
3. Using the 'Accept-Encoding' Header Field in Responses . . . . 3
4. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5. Deployment Considerations . . . . . . . . . . . . . . . . . . 4
6. Security Considerations . . . . . . . . . . . . . . . . . . . 5
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
7.1. Header Field Registry . . . . . . . . . . . . . . . . . . 5
7.2. Status Code Registry . . . . . . . . . . . . . . . . . . 6
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.1. Normative References . . . . . . . . . . . . . . . . . . 6
8.2. Informative References . . . . . . . . . . . . . . . . . 6
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 7
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction
In HTTP, content codings allow for payload encodings such as for
compression or integrity checks ([RFC7231], Section 3.1.2). In
particular, the "gzip" content coding ([RFC7230], Section 4.2) 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 ([RFC7231],
Section 5.3.4) for use in responses, to indicate the content codings
that are supported in requests. It furthermore updates the
definition of status code 415 (Unsupported Media Type) ([RFC7231],
Section 6.5.13), recommending that the "Accept-Encoding" header field
be included when appropriate.
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 defined in the base HTTP
specifications, namely Section 2 of [RFC7230] and Section 3.1.2 of
[RFC7231].
Reschke Standards Track [Page 2]
RFC 7694 HTTP CICE November 2015
3. Using the 'Accept-Encoding' Header Field in Responses
Section 5.3.4 of [RFC7231] defines "Accept-Encoding" as a request
header field only.
This specification expands that definition to allow "Accept-Encoding"
as a response header field as well. When present in a response, it
indicates what content codings the resource was willing to accept in
the associated request. A field value that only contains "identity"
Show full document text