draft-ietf-quic-qpack-15.txt   draft-ietf-quic-qpack-16.txt 
QUIC C. Krasic QUIC C. Krasic
Internet-Draft Netflix Internet-Draft Netflix
Intended status: Standards Track M. Bishop Intended status: Standards Track M. Bishop
Expires: 21 November 2020 Akamai Technologies Expires: 11 December 2020 Akamai Technologies
A. Frindell, Ed. A. Frindell, Ed.
Facebook Facebook
20 May 2020 9 June 2020
QPACK: Header Compression for HTTP/3 QPACK: Header Compression for HTTP/3
draft-ietf-quic-qpack-15 draft-ietf-quic-qpack-16
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 Note to Readers
skipping to change at page 1, line 47 skipping to change at page 1, line 47
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 21 November 2020. This Internet-Draft will expire on 11 December 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 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 (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 25 skipping to change at page 2, line 25
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
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 . . . . . . . . . . . . . . . . 5 2. Compression Process Overview . . . . . . . . . . . . . . . . 5
2.1. Encoder . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Encoder . . . . . . . . . . . . . . . . . . . . . . . . . 6
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 . . . . . . . . . . . . . . . . 8 2.1.4. Known Received Count . . . . . . . . . . . . . . . . 9
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 . . . . . . . . . . . . . . . . 9 2.2.2. State Synchronization . . . . . . . . . . . . . . . . 10
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 . . . . . . . . . . . . . . . . . . . . . . 11 3.2. Dynamic Table . . . . . . . . . . . . . . . . . . . . . . 12
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 . . . . . . . . . . . 13
3.2.4. Absolute Indexing . . . . . . . . . . . . . . . . . . 13 3.2.4. Absolute Indexing . . . . . . . . . . . . . . . . . . 13
3.2.5. Relative Indexing . . . . . . . . . . . . . . . . . . 13 3.2.5. Relative Indexing . . . . . . . . . . . . . . . . . . 14
3.2.6. Post-Base Indexing . . . . . . . . . . . . . . . . . 14 3.2.6. Post-Base Indexing . . . . . . . . . . . . . . . . . 15
4. Wire Format . . . . . . . . . . . . . . . . . . . . . . . . . 15 4. Wire Format . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1. Primitives . . . . . . . . . . . . . . . . . . . . . . . 15 4.1. Primitives . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.1. Prefixed Integers . . . . . . . . . . . . . . . . . . 15 4.1.1. Prefixed Integers . . . . . . . . . . . . . . . . . . 15
4.1.2. String Literals . . . . . . . . . . . . . . . . . . . 15 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 . . . . . . . . . . . . . . . . . . 17
4.3.1. Set Dynamic Table Capacity . . . . . . . . . . . . . 17 4.3.1. Set Dynamic Table Capacity . . . . . . . . . . . . . 17
4.3.2. Insert With Name Reference . . . . . . . . . . . . . 17 4.3.2. Insert With Name Reference . . . . . . . . . . . . . 17
4.3.3. Insert Without Name Reference . . . . . . . . . . . . 18 4.3.3. Insert Without Name Reference . . . . . . . . . . . . 18
4.3.4. Duplicate . . . . . . . . . . . . . . . . . . . . . . 18 4.3.4. Duplicate . . . . . . . . . . . . . . . . . . . . . . 18
skipping to change at page 3, line 36 skipping to change at page 3, line 36
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31
8.1. Settings Registration . . . . . . . . . . . . . . . . . . 31 8.1. Settings Registration . . . . . . . . . . . . . . . . . . 31
8.2. Stream Type Registration . . . . . . . . . . . . . . . . 32 8.2. Stream Type Registration . . . . . . . . . . . . . . . . 32
8.3. Error Code Registration . . . . . . . . . . . . . . . . . 32 8.3. Error Code Registration . . . . . . . . . . . . . . . . . 32
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 33
9.1. Normative References . . . . . . . . . . . . . . . . . . 33 9.1. Normative References . . . . . . . . . . . . . . . . . . 33
9.2. Informative References . . . . . . . . . . . . . . . . . 34 9.2. Informative References . . . . . . . . . . . . . . . . . 34
Appendix A. Static Table . . . . . . . . . . . . . . . . . . . . 34 Appendix A. Static Table . . . . . . . . . . . . . . . . . . . . 34
Appendix B. Sample One Pass Encoding Algorithm . . . . . . . . . 39 Appendix B. Sample One Pass Encoding Algorithm . . . . . . . . . 39
Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 40 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 40
C.1. Since draft-ietf-quic-qpack-14 . . . . . . . . . . . . . 40 C.1. Since draft-ietf-quic-qpack-15 . . . . . . . . . . . . . 40
C.2. Since draft-ietf-quic-qpack-13 . . . . . . . . . . . . . 41 C.2. Since draft-ietf-quic-qpack-14 . . . . . . . . . . . . . 41
C.3. Since draft-ietf-quic-qpack-12 . . . . . . . . . . . . . 41 C.3. Since draft-ietf-quic-qpack-13 . . . . . . . . . . . . . 41
C.4. Since draft-ietf-quic-qpack-11 . . . . . . . . . . . . . 41 C.4. Since draft-ietf-quic-qpack-12 . . . . . . . . . . . . . 41
C.5. Since draft-ietf-quic-qpack-10 . . . . . . . . . . . . . 41 C.5. Since draft-ietf-quic-qpack-11 . . . . . . . . . . . . . 41
C.6. Since draft-ietf-quic-qpack-09 . . . . . . . . . . . . . 41 C.6. Since draft-ietf-quic-qpack-10 . . . . . . . . . . . . . 41
C.7. Since draft-ietf-quic-qpack-08 . . . . . . . . . . . . . 41 C.7. Since draft-ietf-quic-qpack-09 . . . . . . . . . . . . . 41
C.8. Since draft-ietf-quic-qpack-06 . . . . . . . . . . . . . 41 C.8. Since draft-ietf-quic-qpack-08 . . . . . . . . . . . . . 41
C.9. Since draft-ietf-quic-qpack-05 . . . . . . . . . . . . . 41 C.9. Since draft-ietf-quic-qpack-06 . . . . . . . . . . . . . 41
C.10. Since draft-ietf-quic-qpack-04 . . . . . . . . . . . . . 41 C.10. Since draft-ietf-quic-qpack-05 . . . . . . . . . . . . . 41
C.11. Since draft-ietf-quic-qpack-03 . . . . . . . . . . . . . 42 C.11. Since draft-ietf-quic-qpack-04 . . . . . . . . . . . . . 42
C.12. Since draft-ietf-quic-qpack-02 . . . . . . . . . . . . . 42 C.12. Since draft-ietf-quic-qpack-03 . . . . . . . . . . . . . 42
C.13. Since draft-ietf-quic-qpack-01 . . . . . . . . . . . . . 42 C.13. Since draft-ietf-quic-qpack-02 . . . . . . . . . . . . . 42
C.14. Since draft-ietf-quic-qpack-00 . . . . . . . . . . . . . 42 C.14. Since draft-ietf-quic-qpack-01 . . . . . . . . . . . . . 42
C.15. Since draft-ietf-quic-qcram-00 . . . . . . . . . . . . . 43 C.15. Since draft-ietf-quic-qpack-00 . . . . . . . . . . . . . 42
C.16. Since draft-ietf-quic-qcram-00 . . . . . . . . . . . . . 43
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 43 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 43
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44
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 the HTTP/2 [RFC7540]. HTTP/2 uses HPACK [RFC7541] for compression of the
header and trailer sections. If HPACK were used for HTTP/3 [HTTP3], header and trailer sections. If HPACK were used for HTTP/3 [HTTP3],
it would induce head-of-line blocking for field sections due to it would induce head-of-line blocking for field sections due to
skipping to change at page 33, line 30 skipping to change at page 33, line 30
+----------------------------+-------+-------------+---------------+ +----------------------------+-------+-------------+---------------+
Table 3 Table 3
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)", Work in Progress, Internet-Draft, draft-ietf- (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf-
quic-http-28, 20 May 2020, quic-http-29, 9 June 2020,
<https://tools.ietf.org/html/draft-ietf-quic-http-28>. <https://tools.ietf.org/html/draft-ietf-quic-http-29>.
[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", Work in Progress, Multiplexed and Secure Transport", Work in Progress,
Internet-Draft, draft-ietf-quic-transport-28, 20 May 2020, Internet-Draft, draft-ietf-quic-transport-29, 9 June 2020,
<https://tools.ietf.org/html/draft-ietf-quic-transport- <https://tools.ietf.org/html/draft-ietf-quic-transport-
28>. 29>.
[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>.
[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", Work in Progress, Internet-Draft, draft-ietf- Semantics", Work in Progress, Internet-Draft, draft-ietf-
httpbis-semantics-07, 7 March 2020, <http://www.ietf.org/ httpbis-semantics-08, 26 May 2020, <http://www.ietf.org/
internet-drafts/draft-ietf-httpbis-semantics-07.txt>. internet-drafts/draft-ietf-httpbis-semantics-08.txt>.
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 40, line 46 skipping to change at page 40, line 46
encodeInteger(prefixBuffer, 0x80, encodeInteger(prefixBuffer, 0x80,
requiredInsertCount - base - 1, 7) requiredInsertCount - base - 1, 7)
return encoderBuffer, prefixBuffer + streamBuffer return encoderBuffer, prefixBuffer + streamBuffer
Appendix C. Change Log Appendix C. Change Log
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
C.1. Since draft-ietf-quic-qpack-14 C.1. Since draft-ietf-quic-qpack-15
No changes
C.2. Since draft-ietf-quic-qpack-14
Added security considerations Added security considerations
C.2. Since draft-ietf-quic-qpack-13 C.3. Since draft-ietf-quic-qpack-13
No changes No changes
C.3. Since draft-ietf-quic-qpack-12 C.4. Since draft-ietf-quic-qpack-12
Editorial changes only Editorial changes only
C.4. Since draft-ietf-quic-qpack-11 C.5. Since draft-ietf-quic-qpack-11
Editorial changes only Editorial changes only
C.5. Since draft-ietf-quic-qpack-10 C.6. Since draft-ietf-quic-qpack-10
Editorial changes only Editorial changes only
C.6. Since draft-ietf-quic-qpack-09 C.7. Since draft-ietf-quic-qpack-09
* Decoders MUST emit Header Acknowledgements (#2939) * Decoders MUST emit Header Acknowledgements (#2939)
* Updated error code for multiple encoder or decoder streams (#2970) * Updated error code for multiple encoder or decoder streams (#2970)
* Added explicit defaults for new SETTINGS (#2974) * Added explicit defaults for new SETTINGS (#2974)
C.7. Since draft-ietf-quic-qpack-08 C.8. Since draft-ietf-quic-qpack-08
* Endpoints are permitted to create encoder and decoder streams even * Endpoints are permitted to create encoder and decoder streams even
if they can't use them (#2100, #2529) if they can't use them (#2100, #2529)
* Maximum values for settings removed (#2766, #2767) * Maximum values for settings removed (#2766, #2767)
C.8. Since draft-ietf-quic-qpack-06 C.9. Since draft-ietf-quic-qpack-06
* Clarify initial dynamic table capacity maximums (#2276, #2330, * Clarify initial dynamic table capacity maximums (#2276, #2330,
#2330) #2330)
C.9. Since draft-ietf-quic-qpack-05 C.10. Since draft-ietf-quic-qpack-05
* Introduced the terms dynamic table capacity and maximum dynamic * Introduced the terms dynamic table capacity and maximum dynamic
table capacity. table capacity.
* Renamed SETTINGS_HEADER_TABLE_SIZE to * Renamed SETTINGS_HEADER_TABLE_SIZE to
SETTINGS_QPACK_MAX_TABLE_CAPACITY. SETTINGS_QPACK_MAX_TABLE_CAPACITY.
C.10. Since draft-ietf-quic-qpack-04 C.11. Since draft-ietf-quic-qpack-04
* Changed calculation of Delta Base Index to avoid an illegal value * Changed calculation of Delta Base Index to avoid an illegal value
(#2002, #2005) (#2002, #2005)
C.11. Since draft-ietf-quic-qpack-03 C.12. Since draft-ietf-quic-qpack-03
* Change HTTP settings defaults (#2038) * Change HTTP settings defaults (#2038)
* Substantial editorial reorganization * Substantial editorial reorganization
C.12. Since draft-ietf-quic-qpack-02 C.13. Since draft-ietf-quic-qpack-02
* Largest Reference encoded modulo MaxEntries (#1763) * Largest Reference encoded modulo MaxEntries (#1763)
* New Static Table (#1355) * New Static Table (#1355)
* Table Size Update with Insert Count=0 is a connection error * Table Size Update with Insert Count=0 is a connection error
(#1762) (#1762)
* Stream Cancellations are optional when * Stream Cancellations are optional when
SETTINGS_HEADER_TABLE_SIZE=0 (#1761) SETTINGS_HEADER_TABLE_SIZE=0 (#1761)
skipping to change at page 42, line 33 skipping to change at page 42, line 38
* Implementations must handle 62 bit integers (#1760) * Implementations must handle 62 bit integers (#1760)
* Different error types for each QPACK stream, other changes to * Different error types for each QPACK stream, other changes to
error handling (#1726) error handling (#1726)
* Preserve header field order (#1725) * Preserve header field order (#1725)
* Initial table size is the maximum permitted when table is first * Initial table size is the maximum permitted when table is first
usable (#1642) usable (#1642)
C.13. Since draft-ietf-quic-qpack-01 C.14. Since draft-ietf-quic-qpack-01
* Only header blocks that reference the dynamic table are * Only header blocks that reference the dynamic table are
acknowledged (#1603, #1605) acknowledged (#1603, #1605)
C.14. Since draft-ietf-quic-qpack-00 C.15. Since draft-ietf-quic-qpack-00
* Renumbered instructions for consistency (#1471, #1472) * Renumbered instructions for consistency (#1471, #1472)
* Decoder is allowed to validate largest reference (#1404, #1469) * Decoder is allowed to validate largest reference (#1404, #1469)
* Header block acknowledgments also acknowledge the associated * Header block acknowledgments also acknowledge the associated
largest reference (#1370, #1400) largest reference (#1370, #1400)
* Added an acknowledgment for unread streams (#1371, #1400) * Added an acknowledgment for unread streams (#1371, #1400)
* Removed framing from encoder stream (#1361,#1467) * Removed framing from encoder stream (#1361,#1467)
* Control streams use typed unidirectional streams rather than fixed * Control streams use typed unidirectional streams rather than fixed
stream IDs (#910,#1359) stream IDs (#910,#1359)
C.15. Since draft-ietf-quic-qcram-00 C.16. Since draft-ietf-quic-qcram-00
* Separate instruction sets for table updates and header blocks * Separate instruction sets for table updates and header blocks
(#1235, #1142, #1141) (#1235, #1142, #1141)
* Reworked indexing scheme (#1176, #1145, #1136, #1130, #1125, * Reworked indexing scheme (#1176, #1145, #1136, #1130, #1125,
#1314) #1314)
* Added mechanisms that support one-pass encoding (#1138, #1320) * Added mechanisms that support one-pass encoding (#1138, #1320)
* Added a setting to control the number of blocked decoders (#238, * Added a setting to control the number of blocked decoders (#238,
 End of changes. 30 change blocks. 
47 lines changed or deleted 51 lines changed or added

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