draft-ietf-quic-qpack-21.txt   draft-ietf-quic-qpack-latest.txt 
QUIC Working Group C. Krasic QUIC Working Group C. Krasic
Internet-Draft Netflix Internet-Draft Netflix
Intended status: Standards Track M. Bishop Intended status: Standards Track M. Bishop
Expires: August 6, 2021 Akamai Technologies Expires: August 10, 2024 Akamai Technologies
A. Frindell, Ed. A. Frindell, Ed.
Facebook Facebook
February 2, 2021 February 7, 2024
QPACK: Header Compression for HTTP/3 QPACK: Header Compression for HTTP/3
draft-ietf-quic-qpack-21 draft-ietf-quic-qpack-latest
Abstract Abstract
This specification defines QPACK, a compression format for This specification defines QPACK, a compression format for
efficiently representing HTTP fields, to be used in HTTP/3. This is efficiently representing HTTP fields, to be used in HTTP/3. This is
a variation of HPACK compression that seeks to reduce head-of-line a variation of HPACK compression that seeks to reduce head-of-line
blocking. blocking.
Note to Readers
Discussion of this draft takes place on the QUIC working group
mailing list (quic@ietf.org [1]), which is archived at
<https://mailarchive.ietf.org/arch/search/?email_list=quic>.
Working Group information can be found at <https://github.com/
quicwg>; source code and issues list for this draft can be found at
<https://github.com/quicwg/base-drafts/labels/-qpack>.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 6, 2021. This Internet-Draft will expire on August 10, 2024.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2024 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Conventions and Definitions . . . . . . . . . . . . . . . 4 1.1. Conventions and Definitions . . . . . . . . . . . . . . . 4
1.2. Notational Conventions . . . . . . . . . . . . . . . . . 5 1.2. Notational Conventions . . . . . . . . . . . . . . . . . 5
2. Compression Process Overview . . . . . . . . . . . . . . . . 6 2. Compression Process Overview . . . . . . . . . . . . . . . . 5
2.1. Encoder . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1. Encoder . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1. Limits on Dynamic Table Insertions . . . . . . . . . 6 2.1.1. Limits on Dynamic Table Insertions . . . . . . . . . 6
2.1.2. Blocked Streams . . . . . . . . . . . . . . . . . . . 7 2.1.2. Blocked Streams . . . . . . . . . . . . . . . . . . . 7
2.1.3. Avoiding Flow Control Deadlocks . . . . . . . . . . . 8 2.1.3. Avoiding Flow Control Deadlocks . . . . . . . . . . . 8
2.1.4. Known Received Count . . . . . . . . . . . . . . . . 9 2.1.4. Known Received Count . . . . . . . . . . . . . . . . 8
2.2. Decoder . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2. Decoder . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1. Blocked Decoding . . . . . . . . . . . . . . . . . . 9 2.2.1. Blocked Decoding . . . . . . . . . . . . . . . . . . 9
2.2.2. State Synchronization . . . . . . . . . . . . . . . . 10 2.2.2. State Synchronization . . . . . . . . . . . . . . . . 9
2.2.3. Invalid References . . . . . . . . . . . . . . . . . 11 2.2.3. Invalid References . . . . . . . . . . . . . . . . . 11
3. Reference Tables . . . . . . . . . . . . . . . . . . . . . . 11 3. Reference Tables . . . . . . . . . . . . . . . . . . . . . . 11
3.1. Static Table . . . . . . . . . . . . . . . . . . . . . . 11 3.1. Static Table . . . . . . . . . . . . . . . . . . . . . . 11
3.2. Dynamic Table . . . . . . . . . . . . . . . . . . . . . . 12 3.2. Dynamic Table . . . . . . . . . . . . . . . . . . . . . . 11
3.2.1. Dynamic Table Size . . . . . . . . . . . . . . . . . 12 3.2.1. Dynamic Table Size . . . . . . . . . . . . . . . . . 12
3.2.2. Dynamic Table Capacity and Eviction . . . . . . . . . 12 3.2.2. Dynamic Table Capacity and Eviction . . . . . . . . . 12
3.2.3. Maximum Dynamic Table Capacity . . . . . . . . . . . 13 3.2.3. Maximum Dynamic Table Capacity . . . . . . . . . . . 12
3.2.4. Absolute Indexing . . . . . . . . . . . . . . . . . . 14 3.2.4. Absolute Indexing . . . . . . . . . . . . . . . . . . 13
3.2.5. Relative Indexing . . . . . . . . . . . . . . . . . . 14 3.2.5. Relative Indexing . . . . . . . . . . . . . . . . . . 13
3.2.6. Post-Base Indexing . . . . . . . . . . . . . . . . . 15 3.2.6. Post-Base Indexing . . . . . . . . . . . . . . . . . 14
4. Wire Format . . . . . . . . . . . . . . . . . . . . . . . . . 15 4. Wire Format . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1. Primitives . . . . . . . . . . . . . . . . . . . . . . . 15 4.1. Primitives . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.1. Prefixed Integers . . . . . . . . . . . . . . . . . . 16 4.1.1. Prefixed Integers . . . . . . . . . . . . . . . . . . 15
4.1.2. String Literals . . . . . . . . . . . . . . . . . . . 16 4.1.2. String Literals . . . . . . . . . . . . . . . . . . . 15
4.2. Encoder and Decoder Streams . . . . . . . . . . . . . . . 16 4.2. Encoder and Decoder Streams . . . . . . . . . . . . . . . 16
4.3. Encoder Instructions . . . . . . . . . . . . . . . . . . 17 4.3. Encoder Instructions . . . . . . . . . . . . . . . . . . 16
4.3.1. Set Dynamic Table Capacity . . . . . . . . . . . . . 17 4.3.1. Set Dynamic Table Capacity . . . . . . . . . . . . . 17
4.3.2. Insert With Name Reference . . . . . . . . . . . . . 18 4.3.2. Insert With Name Reference . . . . . . . . . . . . . 17
4.3.3. Insert With Literal Name . . . . . . . . . . . . . . 18 4.3.3. Insert With Literal Name . . . . . . . . . . . . . . 18
4.3.4. Duplicate . . . . . . . . . . . . . . . . . . . . . . 19 4.3.4. Duplicate . . . . . . . . . . . . . . . . . . . . . . 18
4.4. Decoder Instructions . . . . . . . . . . . . . . . . . . 19 4.4. Decoder Instructions . . . . . . . . . . . . . . . . . . 19
4.4.1. Section Acknowledgment . . . . . . . . . . . . . . . 19 4.4.1. Section Acknowledgment . . . . . . . . . . . . . . . 19
4.4.2. Stream Cancellation . . . . . . . . . . . . . . . . . 20 4.4.2. Stream Cancellation . . . . . . . . . . . . . . . . . 19
4.4.3. Insert Count Increment . . . . . . . . . . . . . . . 20 4.4.3. Insert Count Increment . . . . . . . . . . . . . . . 20
4.5. Field Line Representations . . . . . . . . . . . . . . . 21 4.5. Field Line Representations . . . . . . . . . . . . . . . 20
4.5.1. Encoded Field Section Prefix . . . . . . . . . . . . 21 4.5.1. Encoded Field Section Prefix . . . . . . . . . . . . 20
4.5.2. Indexed Field Line . . . . . . . . . . . . . . . . . 24 4.5.2. Indexed Field Line . . . . . . . . . . . . . . . . . 23
4.5.3. Indexed Field Line With Post-Base Index . . . . . . . 25 4.5.3. Indexed Field Line With Post-Base Index . . . . . . . 24
4.5.4. Literal Field Line With Name Reference . . . . . . . 25 4.5.4. Literal Field Line With Name Reference . . . . . . . 24
4.5.5. Literal Field Line With Post-Base Name Reference . . 26 4.5.5. Literal Field Line With Post-Base Name Reference . . 25
4.5.6. Literal Field Line With Literal Name . . . . . . . . 26 4.5.6. Literal Field Line With Literal Name . . . . . . . . 25
5. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 27
6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 27 5. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 26
7. Security Considerations . . . . . . . . . . . . . . . . . . . 28 6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 26
7.1. Probing Dynamic Table State . . . . . . . . . . . . . . . 28 7. Security Considerations . . . . . . . . . . . . . . . . . . . 27
7.1.1. Applicability to QPACK and HTTP . . . . . . . . . . . 29 7.1. Probing Dynamic Table State . . . . . . . . . . . . . . . 27
7.1.2. Mitigation . . . . . . . . . . . . . . . . . . . . . 29 7.1.1. Applicability to QPACK and HTTP . . . . . . . . . . . 28
7.1.3. Never-Indexed Literals . . . . . . . . . . . . . . . 30 7.1.2. Mitigation . . . . . . . . . . . . . . . . . . . . . 28
7.2. Static Huffman Encoding . . . . . . . . . . . . . . . . . 31 7.1.3. Never-Indexed Literals . . . . . . . . . . . . . . . 29
7.3. Memory Consumption . . . . . . . . . . . . . . . . . . . 31 7.2. Static Huffman Encoding . . . . . . . . . . . . . . . . . 30
7.4. Implementation Limits . . . . . . . . . . . . . . . . . . 33 7.3. Memory Consumption . . . . . . . . . . . . . . . . . . . 30
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 7.4. Implementation Limits . . . . . . . . . . . . . . . . . . 32
8.1. Settings Registration . . . . . . . . . . . . . . . . . . 33 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32
8.2. Stream Type Registration . . . . . . . . . . . . . . . . 33 8.1. Settings Registration . . . . . . . . . . . . . . . . . . 32
8.3. Error Code Registration . . . . . . . . . . . . . . . . . 34 8.2. Stream Type Registration . . . . . . . . . . . . . . . . 32
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.3. Error Code Registration . . . . . . . . . . . . . . . . . 33
9.1. Normative References . . . . . . . . . . . . . . . . . . 34 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 33
9.2. Informative References . . . . . . . . . . . . . . . . . 35 9.1. Normative References . . . . . . . . . . . . . . . . . . 33
9.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9.2. Informative References . . . . . . . . . . . . . . . . . 34
Appendix A. Static Table . . . . . . . . . . . . . . . . . . . . 36 Appendix A. Static Table . . . . . . . . . . . . . . . . . . . . 35
Appendix B. Encoding and Decoding Examples . . . . . . . . . . . 41 Appendix B. Encoding and Decoding Examples . . . . . . . . . . . 39
B.1. Literal Field Line With Name Reference . . . . . . . . . 41 B.1. Literal Field Line With Name Reference . . . . . . . . . 40
B.2. Dynamic Table . . . . . . . . . . . . . . . . . . . . . . 41 B.2. Dynamic Table . . . . . . . . . . . . . . . . . . . . . . 40
B.3. Speculative Insert . . . . . . . . . . . . . . . . . . . 42 B.3. Speculative Insert . . . . . . . . . . . . . . . . . . . 41
B.4. Duplicate Instruction, Stream Cancellation . . . . . . . 43 B.4. Duplicate Instruction, Stream Cancellation . . . . . . . 42
B.5. Dynamic Table Insert, Eviction . . . . . . . . . . . . . 44 B.5. Dynamic Table Insert, Eviction . . . . . . . . . . . . . 43
Appendix C. Sample One Pass Encoding Algorithm . . . . . . . . . 45 Appendix C. Sample One Pass Encoding Algorithm . . . . . . . . . 44
Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 47 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 46
D.1. Since draft-ietf-quic-qpack-19 . . . . . . . . . . . . . 47 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 47
D.2. Since draft-ietf-quic-qpack-18 . . . . . . . . . . . . . 47
D.3. Since draft-ietf-quic-qpack-17 . . . . . . . . . . . . . 47
D.4. Since draft-ietf-quic-qpack-16 . . . . . . . . . . . . . 47
D.5. Since draft-ietf-quic-qpack-15 . . . . . . . . . . . . . 47
D.6. Since draft-ietf-quic-qpack-14 . . . . . . . . . . . . . 47
D.7. Since draft-ietf-quic-qpack-13 . . . . . . . . . . . . . 47
D.8. Since draft-ietf-quic-qpack-12 . . . . . . . . . . . . . 47
D.9. Since draft-ietf-quic-qpack-11 . . . . . . . . . . . . . 47
D.10. Since draft-ietf-quic-qpack-10 . . . . . . . . . . . . . 48
D.11. Since draft-ietf-quic-qpack-09 . . . . . . . . . . . . . 48
D.12. Since draft-ietf-quic-qpack-08 . . . . . . . . . . . . . 48
D.13. Since draft-ietf-quic-qpack-06 . . . . . . . . . . . . . 48
D.14. Since draft-ietf-quic-qpack-05 . . . . . . . . . . . . . 48
D.15. Since draft-ietf-quic-qpack-04 . . . . . . . . . . . . . 48
D.16. Since draft-ietf-quic-qpack-03 . . . . . . . . . . . . . 48
D.17. Since draft-ietf-quic-qpack-02 . . . . . . . . . . . . . 48
D.18. Since draft-ietf-quic-qpack-01 . . . . . . . . . . . . . 49
D.19. Since draft-ietf-quic-qpack-00 . . . . . . . . . . . . . 49
D.20. Since draft-ietf-quic-qcram-00 . . . . . . . . . . . . . 49
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 50
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51
1. Introduction 1. Introduction
The QUIC transport protocol ([QUIC-TRANSPORT]) is designed to support The QUIC transport protocol ([QUIC-TRANSPORT]) is designed to support
HTTP semantics, and its design subsumes many of the features of HTTP semantics, and its design subsumes many of the features of
HTTP/2 ([RFC7540]). HTTP/2 uses HPACK ([RFC7541]) for compression of HTTP/2 ([RFC7540]). HTTP/2 uses HPACK ([RFC7541]) for compression of
the header and trailer sections. If HPACK were used for HTTP/3 the header and trailer sections. If HPACK were used for HTTP/3
([HTTP3]), it would induce head-of-line blocking for field sections ([HTTP3]), it would induce head-of-line blocking for field sections
due to built-in assumptions of a total ordering across frames on all due to built-in assumptions of a total ordering across frames on all
streams. streams.
skipping to change at page 4, line 40 skipping to change at page 4, line 9
flexibility for implementations to balance between resilience against flexibility for implementations to balance between resilience against
head-of-line blocking and optimal compression ratio. The design head-of-line blocking and optimal compression ratio. The design
goals are to closely approach the compression ratio of HPACK with goals are to closely approach the compression ratio of HPACK with
substantially less head-of-line blocking under the same loss substantially less head-of-line blocking under the same loss
conditions. conditions.
1.1. Conventions and Definitions 1.1. Conventions and Definitions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in BCP
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
Definitions of terms that are used in this document: Definitions of terms that are used in this document:
HTTP fields: Metadata sent as part of an HTTP message. The term HTTP fields: Metadata sent as part of an HTTP message. The term
encompasses both header and trailer fields. Colloquially, the encompasses both header and trailer fields. Colloquially, the
term "headers" has often been used to refer to HTTP header fields term "headers" has often been used to refer to HTTP header fields
and trailer fields; this document uses "fields" for generality. and trailer fields; this document uses "fields" for generality.
HTTP field line: A name-value pair sent as part of an HTTP field HTTP field line: A name-value pair sent as part of an HTTP field
skipping to change at page 10, line 10 skipping to change at page 9, line 32
Required Insert Count. When the Required Insert Count is less than Required Insert Count. When the Required Insert Count is less than
or equal to the decoder's Insert Count, the field section can be or equal to the decoder's Insert Count, the field section can be
processed immediately. Otherwise, the stream on which the field processed immediately. Otherwise, the stream on which the field
section was received becomes blocked. section was received becomes blocked.
While blocked, encoded field section data SHOULD remain in the While blocked, encoded field section data SHOULD remain in the
blocked stream's flow control window. This data is unusable until blocked stream's flow control window. This data is unusable until
the stream becomes unblocked, and releasing the flow control the stream becomes unblocked, and releasing the flow control
prematurely makes the decoder vulnerable to memory exhaustion prematurely makes the decoder vulnerable to memory exhaustion
attacks. A stream becomes unblocked when the Insert Count becomes attacks. A stream becomes unblocked when the Insert Count becomes
unblocked when the Insert Count becomes greater than or equal to the greater than or equal to the Required Insert Count for all encoded
Required Insert Count for all encoded field sections the decoder has field sections the decoder has started reading from the stream.
started reading from the stream.
When processing encoded field sections, the decoder expects the When processing encoded field sections, the decoder expects the
Required Insert Count to equal the lowest possible value for the Required Insert Count to equal the lowest possible value for the
Insert Count with which the field section can be decoded, as Insert Count with which the field section can be decoded, as
prescribed in Section 2.1.2. If it encounters a Required Insert prescribed in Section 2.1.2. If it encounters a Required Insert
Count smaller than expected, it MUST treat this as a connection error Count smaller than expected, it MUST treat this as a connection error
of type QPACK_DECOMPRESSION_FAILED; see Section 2.2.3. If it of type QPACK_DECOMPRESSION_FAILED; see Section 2.2.3. If it
encounters a Required Insert Count larger than expected, it MAY treat encounters a Required Insert Count larger than expected, it MAY treat
this as a connection error of type QPACK_DECOMPRESSION_FAILED. this as a connection error of type QPACK_DECOMPRESSION_FAILED.
skipping to change at page 27, line 27 skipping to change at page 26, line 27
This representation starts with the '001' 3-bit pattern. The fourth This representation starts with the '001' 3-bit pattern. The fourth
bit is the 'N' bit as described in Section 4.5.4. The name follows, bit is the 'N' bit as described in Section 4.5.4. The name follows,
represented as a 4-bit prefix string literal, then the value, represented as a 4-bit prefix string literal, then the value,
represented as an 8-bit prefix string literal; see Section 4.1.2. represented as an 8-bit prefix string literal; see Section 4.1.2.
5. Configuration 5. Configuration
QPACK defines two settings for the HTTP/3 SETTINGS frame: QPACK defines two settings for the HTTP/3 SETTINGS frame:
SETTINGS_QPACK_MAX_TABLE_CAPACITY (0x1): The default value is zero. SETTINGS_QPACK_MAX_TABLE_CAPACITY (0x01): The default value is zero.
See Section 3.2 for usage. This is the equivalent of the See Section 3.2 for usage. This is the equivalent of the
SETTINGS_HEADER_TABLE_SIZE from HTTP/2. SETTINGS_HEADER_TABLE_SIZE from HTTP/2.
SETTINGS_QPACK_BLOCKED_STREAMS (0x7): The default value is zero. SETTINGS_QPACK_BLOCKED_STREAMS (0x07): The default value is zero.
See Section 2.1.2. See Section 2.1.2.
6. Error Handling 6. Error Handling
The following error codes are defined for HTTP/3 to indicate failures The following error codes are defined for HTTP/3 to indicate failures
of QPACK that prevent the stream or connection from continuing: of QPACK that prevent the stream or connection from continuing:
QPACK_DECOMPRESSION_FAILED (0x200): The decoder failed to interpret QPACK_DECOMPRESSION_FAILED (0x0200): The decoder failed to interpret
an encoded field section and is not able to continue decoding that an encoded field section and is not able to continue decoding that
field section. field section.
QPACK_ENCODER_STREAM_ERROR (0x201): The decoder failed to interpret QPACK_ENCODER_STREAM_ERROR (0x0201): The decoder failed to interpret
an encoder instruction received on the encoder stream. an encoder instruction received on the encoder stream.
QPACK_DECODER_STREAM_ERROR (0x202): The encoder failed to interpret QPACK_DECODER_STREAM_ERROR (0x0202): The encoder failed to interpret
a decoder instruction received on the decoder stream. a decoder instruction received on the decoder stream.
7. Security Considerations 7. Security Considerations
This section describes potential areas of security concern with This section describes potential areas of security concern with
QPACK: QPACK:
o Use of compression as a length-based oracle for verifying guesses o Use of compression as a length-based oracle for verifying guesses
about secrets that are compressed into a shared compression about secrets that are compressed into a shared compression
context. context.
skipping to change at page 33, line 25 skipping to change at page 32, line 25
enough to process the largest individual field the HTTP enough to process the largest individual field the HTTP
implementation can be configured to accept. implementation can be configured to accept.
If an implementation encounters a value larger than it is able to If an implementation encounters a value larger than it is able to
decode, this MUST be treated as a stream error of type decode, this MUST be treated as a stream error of type
QPACK_DECOMPRESSION_FAILED if on a request stream, or a connection QPACK_DECOMPRESSION_FAILED if on a request stream, or a connection
error of the appropriate type if on the encoder or decoder stream. error of the appropriate type if on the encoder or decoder stream.
8. IANA Considerations 8. IANA Considerations
This document makes multiple registrations in the registries defined
by [HTTP3]. The allocations created by this document are all
assigned permanent status and list a change controller of the IETF
and a contact of the HTTP working group (ietf-http-wg@w3.org).
8.1. Settings Registration 8.1. Settings Registration
This document specifies two settings. The entries in the following This document specifies two settings. The entries in the following
table are registered in the "HTTP/3 Settings" registry established in table are registered in the "HTTP/3 Settings" registry established in
[HTTP3]. [HTTP3].
+--------------------------+------+---------------+---------+ +--------------------------+------+---------------+---------+
| Setting Name | Code | Specification | Default | | Setting Name | Code | Specification | Default |
+--------------------------+------+---------------+---------+ +--------------------------+------+---------------+---------+
| QPACK_MAX_TABLE_CAPACITY | 0x1 | Section 5 | 0 | | QPACK_MAX_TABLE_CAPACITY | 0x01 | Section 5 | 0 |
| | | | | | | | | |
| QPACK_BLOCKED_STREAMS | 0x7 | Section 5 | 0 | | QPACK_BLOCKED_STREAMS | 0x07 | Section 5 | 0 |
+--------------------------+------+---------------+---------+ +--------------------------+------+---------------+---------+
For fomatting reasons, the setting names here are abbreviated by For fomatting reasons, the setting names here are abbreviated by
removing the 'SETTING_' prefix. removing the 'SETTING_' prefix.
8.2. Stream Type Registration 8.2. Stream Type Registration
This document specifies two stream types. The entries in the This document specifies two stream types. The entries in the
following table are registered in the "HTTP/3 Stream Type" registry following table are registered in the "HTTP/3 Stream Type" registry
established in [HTTP3]. established in [HTTP3].
skipping to change at page 34, line 19 skipping to change at page 33, line 19
| | | | | | | | | |
| QPACK Decoder Stream | 0x03 | Section 4.2 | Both | | QPACK Decoder Stream | 0x03 | Section 4.2 | Both |
+----------------------+------+---------------+--------+ +----------------------+------+---------------+--------+
8.3. Error Code Registration 8.3. Error Code Registration
This document specifies three error codes. The entries in the This document specifies three error codes. The entries in the
following table are registered in the "HTTP/3 Error Code" registry following table are registered in the "HTTP/3 Error Code" registry
established in [HTTP3]. established in [HTTP3].
+----------------------------+-------+--------------+---------------+ +----------------------------+--------+-------------+---------------+
| Name | Code | Description | Specification | | Name | Code | Description | Specification |
+----------------------------+-------+--------------+---------------+ +----------------------------+--------+-------------+---------------+
| QPACK_DECOMPRESSION_FAILED | 0x200 | Decoding of | Section 6 | | QPACK_DECOMPRESSION_FAILED | 0x0200 | Decoding of | Section 6 |
| | | a field | | | | | a field | |
| | | section | | | | | section | |
| | | failed | | | | | failed | |
| | | | | | | | | |
| QPACK_ENCODER_STREAM_ERROR | 0x201 | Error on the | Section 6 | | QPACK_ENCODER_STREAM_ERROR | 0x0201 | Error on | Section 6 |
| | | encoder | | | | | the encoder | |
| | | stream | | | | | stream | |
| | | | | | | | | |
| QPACK_DECODER_STREAM_ERROR | 0x202 | Error on the | Section 6 | | QPACK_DECODER_STREAM_ERROR | 0x0202 | Error on | Section 6 |
| | | decoder | | | | | the decoder | |
| | | stream | | | | | stream | |
+----------------------------+-------+--------------+---------------+ +----------------------------+--------+-------------+---------------+
9. References 9. References
9.1. Normative References 9.1. Normative References
[HTTP3] Bishop, M., Ed., "Hypertext Transfer Protocol Version 3 [HTTP3] Bishop, M., Ed., "Hypertext Transfer Protocol Version 3
(HTTP/3)", draft-ietf-quic-http-34 (work in progress). (HTTP/3)", draft-ietf-quic-http-latest (work in progress).
[QUIC-TRANSPORT] [QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", draft-ietf-quic- Multiplexed and Secure Transport", RFC 9000,
transport-34 (work in progress). DOI 10.17487/RFC9000,
<https://www.rfc-editor.org/info/rfc9000>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC2360] Scott, G., "Guide for Internet Standards Writers", BCP 22, [RFC2360] Scott, G., "Guide for Internet Standards Writers", BCP 22,
RFC 2360, DOI 10.17487/RFC2360, June 1998, RFC 2360, DOI 10.17487/RFC2360, June 1998,
<https://www.rfc-editor.org/info/rfc2360>. <https://www.rfc-editor.org/info/rfc2360>.
[RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for
HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015,
<https://www.rfc-editor.org/info/rfc7541>. <https://www.rfc-editor.org/info/rfc7541>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[SEMANTICS] [SEMANTICS]
Fielding, R., Nottingham, M., and J. Reschke, "HTTP Fielding, R., Nottingham, M., and J. Reschke, "HTTP
Semantics", draft-ietf-httpbis-semantics-14 (work in Semantics", draft-ietf-httpbis-semantics-19 (work in
progress), January 2021. progress), September 2021.
9.2. Informative References 9.2. Informative References
[CRIME] Wikipedia, "CRIME", May 2015, <http://en.wikipedia.org/w/ [CRIME] Wikipedia, "CRIME", May 2015, <http://en.wikipedia.org/w/
index.php?title=CRIME&oldid=660948120>. index.php?title=CRIME&oldid=660948120>.
[PETAL] Tan, J. and J. Nahata, "PETAL: Preset Encoding [PETAL] Tan, J. and J. Nahata, "PETAL: Preset Encoding
Table Information Leakage", April 2013, Table Information Leakage", April 2013,
<http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL- <http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-
13-106.pdf>. 13-106.pdf>.
skipping to change at page 36, line 5 skipping to change at page 35, line 5
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015, DOI 10.17487/RFC7540, May 2015,
<https://www.rfc-editor.org/info/rfc7540>. <https://www.rfc-editor.org/info/rfc7540>.
[TLS] Rescorla, E., "The Transport Layer Security (TLS) Protocol [TLS] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
9.3. URIs
[1] mailto:quic@ietf.org
Appendix A. Static Table Appendix A. Static Table
This table was generated by analyzing actual Internet traffic in 2018 This table was generated by analyzing actual Internet traffic in 2018
and including the most common header fields, after filtering out some and including the most common header fields, after filtering out some
unsupported and non-standard values. Due to this methodology, some unsupported and non-standard values. Due to this methodology, some
of the entries may be inconsistent or appear multiple times with of the entries may be inconsistent or appear multiple times with
similar but not identical values. The order of the entries is similar but not identical values. The order of the entries is
optimized to encode the most common header fields with the smallest optimized to encode the most common header fields with the smallest
number of bytes. number of bytes.
skipping to change at page 44, line 8 skipping to change at page 43, line 8
The encoder duplicates an existing entry in the dynamic table, then The encoder duplicates an existing entry in the dynamic table, then
sends an encoded field section referencing the dynamic table entries sends an encoded field section referencing the dynamic table entries
including the duplicated entry. The packet containing the encoder including the duplicated entry. The packet containing the encoder
stream data is delayed. Before the packet arrives, the decoder stream data is delayed. Before the packet arrives, the decoder
cancels the stream and notifies the encoder that the encoded field cancels the stream and notifies the encoder that the encoded field
section was not processed. section was not processed.
Stream: Encoder Stream: Encoder
02 | Duplicate (Relative Index = 2) 02 | Duplicate (Relative Index = 2)
| Absolute Index = | Absolute Index =
| Insert Count(4) - Index(2) - 1 = 1 | Insert Count(3) - Index(2) - 1 = 0
Abs Ref Name Value Abs Ref Name Value
0 0 :authority www.example.com 0 0 :authority www.example.com
1 0 :path /sample/path 1 0 :path /sample/path
2 0 custom-key custom-value 2 0 custom-key custom-value
^-- acknowledged --^ ^-- acknowledged --^
3 0 :authority www.example.com 3 0 :authority www.example.com
Size=217 Size=217
Stream: 8 Stream: 8
skipping to change at page 44, line 45 skipping to change at page 43, line 45
Size=217 Size=217
Stream: Decoder Stream: Decoder
48 | Stream Cancellation (Stream=8) 48 | Stream Cancellation (Stream=8)
Abs Ref Name Value Abs Ref Name Value
0 0 :authority www.example.com 0 0 :authority www.example.com
1 0 :path /sample/path 1 0 :path /sample/path
2 0 custom-key custom-value 2 0 custom-key custom-value
^-- acknowledged --^ ^-- acknowledged --^
4 0 :authority www.example.com 3 0 :authority www.example.com
Size=217 Size=217
B.5. Dynamic Table Insert, Eviction B.5. Dynamic Table Insert, Eviction
The encoder inserts another header into the dynamic table, which The encoder inserts another header into the dynamic table, which
evicts the oldest entry. The encoder does not send any encoded field evicts the oldest entry. The encoder does not send any encoded field
sections. sections.
Stream: Encoder Stream: Encoder
810d 6375 7374 6f6d | Insert With Name Reference 810d 6375 7374 6f6d | Insert With Name Reference
skipping to change at page 47, line 10 skipping to change at page 46, line 10
if base >= requiredInsertCount: if base >= requiredInsertCount:
encodeInteger(prefixBuffer, 0x00, encodeInteger(prefixBuffer, 0x00,
base - requiredInsertCount, 7) base - requiredInsertCount, 7)
else: else:
encodeInteger(prefixBuffer, 0x80, encodeInteger(prefixBuffer, 0x80,
requiredInsertCount - base - 1, 7) requiredInsertCount - base - 1, 7)
return encoderBuffer, prefixBuffer + streamBuffer return encoderBuffer, prefixBuffer + streamBuffer
Appendix D. Change Log
*RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document.
D.1. Since draft-ietf-quic-qpack-19
Editorial changes only
D.2. Since draft-ietf-quic-qpack-18
Editorial changes only
D.3. Since draft-ietf-quic-qpack-17
Editorial changes only
D.4. Since draft-ietf-quic-qpack-16
Editorial changes only
D.5. Since draft-ietf-quic-qpack-15
No changes
D.6. Since draft-ietf-quic-qpack-14
Added security considerations
D.7. Since draft-ietf-quic-qpack-13
No changes
D.8. Since draft-ietf-quic-qpack-12
Editorial changes only
D.9. Since draft-ietf-quic-qpack-11
Editorial changes only
D.10. Since draft-ietf-quic-qpack-10
Editorial changes only
D.11. Since draft-ietf-quic-qpack-09
o Decoders MUST emit Header Acknowledgments (#2939)
o Updated error code for multiple encoder or decoder streams (#2970)
o Added explicit defaults for new SETTINGS (#2974)
D.12. Since draft-ietf-quic-qpack-08
o Endpoints are permitted to create encoder and decoder streams even
if they can't use them (#2100, #2529)
o Maximum values for settings removed (#2766, #2767)
D.13. Since draft-ietf-quic-qpack-06
o Clarify initial dynamic table capacity maximums (#2276, #2330,
#2330)
D.14. Since draft-ietf-quic-qpack-05
o Introduced the terms dynamic table capacity and maximum dynamic
table capacity.
o Renamed SETTINGS_HEADER_TABLE_SIZE to
SETTINGS_QPACK_MAX_TABLE_CAPACITY.
D.15. Since draft-ietf-quic-qpack-04
o Changed calculation of Delta Base Index to avoid an illegal value
(#2002, #2005)
D.16. Since draft-ietf-quic-qpack-03
o Change HTTP settings defaults (#2038)
o Substantial editorial reorganization
D.17. Since draft-ietf-quic-qpack-02
o Largest Reference encoded modulo MaxEntries (#1763)
o New Static Table (#1355)
o Table Size Update with Insert Count=0 is a connection error
(#1762)
o Stream Cancellations are optional when
SETTINGS_HEADER_TABLE_SIZE=0 (#1761)
o Implementations must handle 62 bit integers (#1760)
o Different error types for each QPACK stream, other changes to
error handling (#1726)
o Preserve header field order (#1725)
o Initial table size is the maximum permitted when table is first
usable (#1642)
D.18. Since draft-ietf-quic-qpack-01
o Only header blocks that reference the dynamic table are
acknowledged (#1603, #1605)
D.19. Since draft-ietf-quic-qpack-00
o Renumbered instructions for consistency (#1471, #1472)
o Decoder is allowed to validate largest reference (#1404, #1469)
o Header block acknowledgments also acknowledge the associated
largest reference (#1370, #1400)
o Added an acknowledgment for unread streams (#1371, #1400)
o Removed framing from encoder stream (#1361,#1467)
o Control streams use typed unidirectional streams rather than fixed
stream IDs (#910,#1359)
D.20. Since draft-ietf-quic-qcram-00
o Separate instruction sets for table updates and header blocks
(#1235, #1142, #1141)
o Reworked indexing scheme (#1176, #1145, #1136, #1130, #1125,
#1314)
o Added mechanisms that support one-pass encoding (#1138, #1320)
o Added a setting to control the number of blocked decoders (#238,
#1140, #1143)
o Moved table updates and acknowledgments to dedicated streams
(#1121, #1122, #1238)
Acknowledgments Acknowledgments
The IETF QUIC Working Group received an enormous amount of support The IETF QUIC Working Group received an enormous amount of support
from many people. from many people.
The compression design team did substantial work exploring the The compression design team did substantial work exploring the
problem space and influencing the initial draft. The contributions problem space and influencing the initial draft. The contributions
of design team members Roberto Peon, Martin Thomson, and Dmitri of design team members Roberto Peon, Martin Thomson, and Dmitri
Tikhonov are gratefully acknowledged. Tikhonov are gratefully acknowledged.
 End of changes. 36 change blocks. 
267 lines changed or deleted 96 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/