| draft-ietf-quic-qpack-09.txt | draft-ietf-quic-qpack-10.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: January 9, 2020 Akamai Technologies | Expires: March 15, 2020 Akamai Technologies | |||
| A. Frindell, Ed. | A. Frindell, Ed. | |||
| July 08, 2019 | September 12, 2019 | |||
| QPACK: Header Compression for HTTP/3 | QPACK: Header Compression for HTTP/3 | |||
| draft-ietf-quic-qpack-09 | draft-ietf-quic-qpack-10 | |||
| Abstract | Abstract | |||
| This specification defines QPACK, a compression format for | This specification defines QPACK, a compression format for | |||
| efficiently representing HTTP header fields, to be used in HTTP/3. | efficiently representing HTTP header fields, to be used in HTTP/3. | |||
| This is a variation of HPACK header compression that seeks to reduce | This is a variation of HPACK header compression that seeks to reduce | |||
| head-of-line blocking. | head-of-line blocking. | |||
| Note to Readers | Note to Readers | |||
| skipping to change at page 1, line 46 ¶ | skipping to change at page 1, line 46 ¶ | |||
| 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 January 9, 2020. | This Internet-Draft will expire on March 15, 2020. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 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 | |||
| skipping to change at page 3, line 12 ¶ | skipping to change at page 3, line 12 ¶ | |||
| 4.3.2. Insert With Name Reference . . . . . . . . . . . . . 16 | 4.3.2. Insert With Name Reference . . . . . . . . . . . . . 16 | |||
| 4.3.3. Insert Without Name Reference . . . . . . . . . . . . 17 | 4.3.3. Insert Without Name Reference . . . . . . . . . . . . 17 | |||
| 4.3.4. Duplicate . . . . . . . . . . . . . . . . . . . . . . 17 | 4.3.4. Duplicate . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 4.4. Decoder Instructions . . . . . . . . . . . . . . . . . . 18 | 4.4. Decoder Instructions . . . . . . . . . . . . . . . . . . 18 | |||
| 4.4.1. Header Acknowledgement . . . . . . . . . . . . . . . 18 | 4.4.1. Header Acknowledgement . . . . . . . . . . . . . . . 18 | |||
| 4.4.2. Stream Cancellation . . . . . . . . . . . . . . . . . 18 | 4.4.2. Stream Cancellation . . . . . . . . . . . . . . . . . 18 | |||
| 4.4.3. Insert Count Increment . . . . . . . . . . . . . . . 19 | 4.4.3. Insert Count Increment . . . . . . . . . . . . . . . 19 | |||
| 4.5. Header Block Representations . . . . . . . . . . . . . . 19 | 4.5. Header Block Representations . . . . . . . . . . . . . . 19 | |||
| 4.5.1. Header Block Prefix . . . . . . . . . . . . . . . . . 19 | 4.5.1. Header Block Prefix . . . . . . . . . . . . . . . . . 19 | |||
| 4.5.2. Indexed Header Field . . . . . . . . . . . . . . . . 22 | 4.5.2. Indexed Header Field . . . . . . . . . . . . . . . . 22 | |||
| 4.5.3. Indexed Header Field With Post-Base Index . . . . . . 22 | 4.5.3. Indexed Header Field With Post-Base Index . . . . . . 23 | |||
| 4.5.4. Literal Header Field With Name Reference . . . . . . 23 | 4.5.4. Literal Header Field With Name Reference . . . . . . 23 | |||
| 4.5.5. Literal Header Field With Post-Base Name Reference . 24 | 4.5.5. Literal Header Field With Post-Base Name Reference . 24 | |||
| 4.5.6. Literal Header Field Without Name Reference . . . . . 24 | 4.5.6. Literal Header Field Without Name Reference . . . . . 24 | |||
| 5. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 25 | 5. Configuration . . . . . . . . . . . . . . . . . . . . . . . . 25 | |||
| 6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 25 | 6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 25 | |||
| 7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 | |||
| 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 | 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 8.1. Settings Registration . . . . . . . . . . . . . . . . . . 26 | 8.1. Settings Registration . . . . . . . . . . . . . . . . . . 26 | |||
| 8.2. Stream Type Registration . . . . . . . . . . . . . . . . 26 | 8.2. Stream Type Registration . . . . . . . . . . . . . . . . 26 | |||
| 8.3. Error Code Registration . . . . . . . . . . . . . . . . . 26 | 8.3. Error Code Registration . . . . . . . . . . . . . . . . . 26 | |||
| 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 | 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 | |||
| 9.1. Normative References . . . . . . . . . . . . . . . . . . 27 | 9.1. Normative References . . . . . . . . . . . . . . . . . . 27 | |||
| 9.2. Informative References . . . . . . . . . . . . . . . . . 28 | 9.2. Informative References . . . . . . . . . . . . . . . . . 28 | |||
| 9.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 28 | 9.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 28 | |||
| Appendix A. Static Table . . . . . . . . . . . . . . . . . . . . 28 | Appendix A. Static Table . . . . . . . . . . . . . . . . . . . . 28 | |||
| Appendix B. Sample One Pass Encoding Algorithm . . . . . . . . . 33 | Appendix B. Sample One Pass Encoding Algorithm . . . . . . . . . 33 | |||
| Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 35 | Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 35 | |||
| C.1. Since draft-ietf-quic-qpack-08 . . . . . . . . . . . . . 35 | C.1. Since draft-ietf-quic-qpack-09 . . . . . . . . . . . . . 35 | |||
| C.2. Since draft-ietf-quic-qpack-06 . . . . . . . . . . . . . 35 | C.2. Since draft-ietf-quic-qpack-08 . . . . . . . . . . . . . 35 | |||
| C.3. Since draft-ietf-quic-qpack-05 . . . . . . . . . . . . . 35 | C.3. Since draft-ietf-quic-qpack-06 . . . . . . . . . . . . . 35 | |||
| C.4. Since draft-ietf-quic-qpack-04 . . . . . . . . . . . . . 35 | C.4. Since draft-ietf-quic-qpack-05 . . . . . . . . . . . . . 35 | |||
| C.5. Since draft-ietf-quic-qpack-03 . . . . . . . . . . . . . 35 | C.5. Since draft-ietf-quic-qpack-04 . . . . . . . . . . . . . 35 | |||
| C.6. Since draft-ietf-quic-qpack-02 . . . . . . . . . . . . . 35 | C.6. Since draft-ietf-quic-qpack-03 . . . . . . . . . . . . . 35 | |||
| C.7. Since draft-ietf-quic-qpack-01 . . . . . . . . . . . . . 36 | C.7. Since draft-ietf-quic-qpack-02 . . . . . . . . . . . . . 36 | |||
| C.8. Since draft-ietf-quic-qpack-00 . . . . . . . . . . . . . 36 | C.8. Since draft-ietf-quic-qpack-01 . . . . . . . . . . . . . 36 | |||
| C.9. Since draft-ietf-quic-qcram-00 . . . . . . . . . . . . . 36 | C.9. Since draft-ietf-quic-qpack-00 . . . . . . . . . . . . . 36 | |||
| C.10. Since draft-ietf-quic-qcram-00 . . . . . . . . . . . . . 36 | ||||
| Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 37 | Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
| 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 header | HTTP/2 [RFC7540]. HTTP/2 uses HPACK ([RFC7541]) for header | |||
| compression. If HPACK were used for HTTP/3 [HTTP3], it would induce | compression. If HPACK were used for HTTP/3 [HTTP3], it would induce | |||
| head-of-line blocking due to built-in assumptions of a total ordering | head-of-line blocking due to built-in assumptions of a total ordering | |||
| skipping to change at page 4, line 39 ¶ | skipping to change at page 4, line 39 ¶ | |||
| Header block: The compressed representation of a header list. | Header block: The compressed representation of a header list. | |||
| Encoder: An implementation which transforms a header list into a | Encoder: An implementation which transforms a header list into a | |||
| header block. | header block. | |||
| Decoder: An implementation which transforms a header block into a | Decoder: An implementation which transforms a header block into a | |||
| header list. | header list. | |||
| Absolute Index: A unique index for each entry in the dynamic table. | Absolute Index: A unique index for each entry in the dynamic table. | |||
| Base: A reference point for relative indices. Dynamic references | Base: A reference point for relative and post-base indices. | |||
| are made relative to a Base in header blocks. | References to dynamic table entries in header blocks are relative | |||
| to a Base. | ||||
| Insert Count: The total number of entries inserted in the dynamic | Insert Count: The total number of entries inserted in the dynamic | |||
| table. | table. | |||
| QPACK is a name, not an acronym. | QPACK is a name, not an acronym. | |||
| 1.2. Notational Conventions | 1.2. Notational Conventions | |||
| Diagrams use the format described in Section 3.1 of [RFC2360], with | Diagrams use the format described in Section 3.1 of [RFC2360], with | |||
| the following additional conventions: | the following additional conventions: | |||
| skipping to change at page 5, line 4 ¶ | skipping to change at page 5, line 6 ¶ | |||
| table. | table. | |||
| QPACK is a name, not an acronym. | QPACK is a name, not an acronym. | |||
| 1.2. Notational Conventions | 1.2. Notational Conventions | |||
| Diagrams use the format described in Section 3.1 of [RFC2360], with | Diagrams use the format described in Section 3.1 of [RFC2360], with | |||
| the following additional conventions: | the following additional conventions: | |||
| x (A) Indicates that x is A bits long | x (A) Indicates that x is A bits long | |||
| x (A+) Indicates that x uses the prefixed integer encoding defined | x (A+) Indicates that x uses the prefixed integer encoding defined | |||
| in Section 5.1 of [RFC7541], beginning with an A-bit prefix. | in Section 4.1.1, beginning with an A-bit prefix. | |||
| x ... Indicates that x is variable-length and extends to the end of | x ... Indicates that x is variable-length and extends to the end of | |||
| the region. | the region. | |||
| 2. Compression Process Overview | 2. Compression Process Overview | |||
| Like HPACK, QPACK uses two tables for associating header fields to | Like HPACK, QPACK uses two tables for associating header fields to | |||
| indices. The static table (see Section 3.1) is predefined and | indices. The static table (see Section 3.1) is predefined and | |||
| contains common header fields (some of them with an empty value). | contains common header fields (some of them with an empty value). | |||
| The dynamic table (see Section 3.2) is built up over the course of | The dynamic table (see Section 3.2) is built up over the course of | |||
| skipping to change at page 7, line 34 ¶ | skipping to change at page 7, line 34 ¶ | |||
| which the header block can be decoded. For a header block with | which the header block can be decoded. For a header block with | |||
| references to the dynamic table, the Required Insert Count is one | references to the dynamic table, the Required Insert Count is one | |||
| larger than the largest absolute index of all referenced dynamic | larger than the largest absolute index of all referenced dynamic | |||
| table entries. For a header block with no references to the dynamic | table entries. For a header block with no references to the dynamic | |||
| table, the Required Insert Count is zero. | table, the Required Insert Count is zero. | |||
| When the decoder receives a header block with a Required Insert Count | When the decoder receives a header block with a Required Insert Count | |||
| greater than its own Insert Count, the stream cannot be processed | greater than its own Insert Count, the stream cannot be processed | |||
| immediately, and is considered "blocked" (see {blocked-decoding}). | immediately, and is considered "blocked" (see {blocked-decoding}). | |||
| The SETTINGS_QPACK_BLOCKED_STREAMS setting (see Section 5) specifies | The decoder specifies an upper bound on the number of streams which | |||
| an upper bound on the number of streams which can be blocked. An | can be blocked using the SETTINGS_QPACK_BLOCKED_STREAMS setting (see | |||
| encoder MUST limit the number of streams which could become blocked | Section 5). An encoder MUST limit the number of streams which could | |||
| to the value of SETTINGS_QPACK_BLOCKED_STREAMS at all times. Note | become blocked to the value of SETTINGS_QPACK_BLOCKED_STREAMS at all | |||
| that the decoder might not become blocked on every stream which risks | times. If an decoder encounters more blocked streams than it | |||
| becoming blocked. | promised to support, it MUST treat this as a connection error of type | |||
| HTTP_QPACK_DECOMPRESSION_FAILED. | ||||
| Note that the decoder might not become blocked on every stream which | ||||
| risks becoming blocked. | ||||
| An encoder can decide whether to risk having a stream become blocked. | An encoder can decide whether to risk having a stream become blocked. | |||
| If permitted by the value of SETTINGS_QPACK_BLOCKED_STREAMS, | If permitted by the value of SETTINGS_QPACK_BLOCKED_STREAMS, | |||
| compression efficiency can often be improved by referencing dynamic | compression efficiency can often be improved by referencing dynamic | |||
| table entries that are still in transit, but if there is loss or | table entries that are still in transit, but if there is loss or | |||
| reordering the stream can become blocked at the decoder. An encoder | reordering the stream can become blocked at the decoder. An encoder | |||
| avoids the risk of blocking by only referencing dynamic table entries | avoids the risk of blocking by only referencing dynamic table entries | |||
| which have been acknowledged, but this could mean using literals. | which have been acknowledged, but this could mean using literals. | |||
| Since literals make the header block larger, this can result in the | Since literals make the header block larger, this can result in the | |||
| encoder becoming blocked on congestion or flow control limits. | encoder becoming blocked on congestion or flow control limits. | |||
| 2.1.4. Known Received Count | 2.1.4. Known Received Count | |||
| In order to identify which dynamic table entries can be safely used | In order to identify which dynamic table entries can be safely used | |||
| without a stream becoming blocked, the encoder tracks the number of | without a stream becoming blocked, the encoder tracks the number of | |||
| entries received by the decoder. The Known Received Count tracks the | entries received by the decoder. The Known Received Count tracks the | |||
| total number of acknowledged insertions. | total number of acknowledged insertions. | |||
| skipping to change at page 8, line 51 ¶ | skipping to change at page 9, line 6 ¶ | |||
| immediately. Otherwise, the stream on which the header block was | immediately. Otherwise, the stream on which the header block was | |||
| received becomes blocked. | received becomes blocked. | |||
| While blocked, header block data SHOULD remain in the blocked | While blocked, header block data SHOULD remain in the blocked | |||
| stream's flow control window. A stream becomes unblocked when the | stream's flow control window. A stream becomes unblocked when the | |||
| Insert Count becomes greater than or equal to the Required Insert | Insert Count becomes greater than or equal to the Required Insert | |||
| Count for all header blocks the decoder has started reading from the | Count for all header blocks the decoder has started reading from the | |||
| stream. | stream. | |||
| When processing header blocks, the decoder expects the Required | When processing header blocks, the decoder expects the Required | |||
| Insert Count to exactly match the value defined in {{blocked- | Insert Count to exactly match the value defined in Section 2.1.3. If | |||
| streams}. If it encounters a smaller value than expected, it MUST | it encounters a smaller value than expected, it MUST treat this as a | |||
| treat this as a connection error of type | connection error of type HTTP_QPACK_DECOMPRESSION_FAILED (see | |||
| HTTP_QPACK_DECOMPRESSION_FAILED (see Section 2.2.3). If it | Section 2.2.3). If it encounters a larger value than expected, it | |||
| encounters a larger value than expected, it MAY treat this as a | MAY treat this as a connection error of type | |||
| connection error of type HTTP_QPACK_DECOMPRESSION_FAILED. | ||||
| If the decoder encounters more blocked streams than it promised to | ||||
| support, it MUST treat this as a connection error of type | ||||
| HTTP_QPACK_DECOMPRESSION_FAILED. | HTTP_QPACK_DECOMPRESSION_FAILED. | |||
| 2.2.2. State Synchronization | 2.2.2. State Synchronization | |||
| The decoder signals the following events by emitting decoder | The decoder signals the following events by emitting decoder | |||
| instructions (Section 4.4) on the decoder stream. | instructions (Section 4.4) on the decoder stream. | |||
| 2.2.2.1. Completed Processing of a Header Block | 2.2.2.1. Completed Processing of a Header Block | |||
| When the decoder finishes decoding a header block containing dynamic | After the decoder finishes decoding a header block containing dynamic | |||
| table references, it emits a Header Acknowledgement instruction | table references, it MUST emit a Header Acknowledgement instruction | |||
| (Section 4.4.1). A stream may carry multiple header blocks in the | (Section 4.4.1). A stream may carry multiple header blocks in the | |||
| case of intermediate responses, trailers, and pushed requests. The | case of intermediate responses, trailers, and pushed requests. The | |||
| encoder interprets each Header Acknowledgement instruction as | encoder interprets each Header Acknowledgement instruction as | |||
| acknowledging the earliest unacknowledged header block containing | acknowledging the earliest unacknowledged header block containing | |||
| dynamic table references sent on the given stream. | dynamic table references sent on the given stream. | |||
| 2.2.2.2. Abandonment of a Stream | 2.2.2.2. Abandonment of a Stream | |||
| When an endpoint receives a stream reset before the end of a stream | When an endpoint receives a stream reset before the end of a stream | |||
| or before all header blocks are processed on that stream, or when it | or before all header blocks are processed on that stream, or when it | |||
| skipping to change at page 9, line 43 ¶ | skipping to change at page 9, line 43 ¶ | |||
| instruction (see Section 4.4.2). This signals to the encoder that | instruction (see Section 4.4.2). This signals to the encoder that | |||
| all references to the dynamic table on that stream are no longer | all references to the dynamic table on that stream are no longer | |||
| outstanding. A decoder with a maximum dynamic table capacity equal | outstanding. A decoder with a maximum dynamic table capacity equal | |||
| to zero (see Section 3.2.3) MAY omit sending Stream Cancellations, | to zero (see Section 3.2.3) MAY omit sending Stream Cancellations, | |||
| because the encoder cannot have any dynamic table references. An | because the encoder cannot have any dynamic table references. An | |||
| encoder cannot infer from this instruction that any updates to the | encoder cannot infer from this instruction that any updates to the | |||
| dynamic table have been received. | dynamic table have been received. | |||
| The Header Acknowledgement and Stream Cancellation instructions | The Header Acknowledgement and Stream Cancellation instructions | |||
| permit the encoder to remove references to entries in the dynamic | permit the encoder to remove references to entries in the dynamic | |||
| table. When entries have zero references they are no longer | table. When an entry with absolute index lower than the Known | |||
| considered blocking (see Section 2.1.2). | Received Count has zero references, then it is no longer considered | |||
| blocking (see Section 2.1.2). | ||||
| 2.2.2.3. New Table Entries | 2.2.2.3. New Table Entries | |||
| After receiving new table entries on the encoder stream, the decoder | After receiving new table entries on the encoder stream, the decoder | |||
| chooses when to emit Insert Count Increment instructions (see | chooses when to emit Insert Count Increment instructions (see | |||
| Section 4.4.3). Emitting this instruction after adding each new | Section 4.4.3). Emitting this instruction after adding each new | |||
| dynamic table entry will provide the timeliest feedback to the | dynamic table entry will provide the timeliest feedback to the | |||
| encoder, but could be redundant with other decoder feedback. By | encoder, but could be redundant with other decoder feedback. By | |||
| delaying an Insert Count Increment instruction, the decoder might be | delaying an Insert Count Increment instruction, the decoder might be | |||
| able to coalesce multiple Insert Count Increment instructions, or | able to coalesce multiple Insert Count Increment instructions, or | |||
| skipping to change at page 15, line 30 ¶ | skipping to change at page 15, line 30 ¶ | |||
| carries an unframed sequence of encoder instructions from encoder | carries an unframed sequence of encoder instructions from encoder | |||
| to decoder. | to decoder. | |||
| o A decoder stream is a unidirectional stream of type "0x03". It | o A decoder stream is a unidirectional stream of type "0x03". It | |||
| carries an unframed sequence of decoder instructions from decoder | carries an unframed sequence of decoder instructions from decoder | |||
| to encoder. | to encoder. | |||
| HTTP/3 endpoints contain a QPACK encoder and decoder. Each endpoint | HTTP/3 endpoints contain a QPACK encoder and decoder. Each endpoint | |||
| MUST initiate at most one encoder stream and at most one decoder | MUST initiate at most one encoder stream and at most one decoder | |||
| stream. Receipt of a second instance of either stream type MUST be | stream. Receipt of a second instance of either stream type MUST be | |||
| treated as a connection error of type HTTP_WRONG_STREAM_COUNT. These | treated as a connection error of type HTTP_STREAM_CREATION_ERROR. | |||
| streams MUST NOT be closed. Closure of either unidirectional stream | These streams MUST NOT be closed. Closure of either unidirectional | |||
| type MUST be treated as a connection error of type | stream type MUST be treated as a connection error of type | |||
| HTTP_CLOSED_CRITICAL_STREAM. | HTTP_CLOSED_CRITICAL_STREAM. | |||
| An endpoint MAY avoid creating its own encoder stream if it's not | An endpoint MAY avoid creating its own encoder stream if it's not | |||
| going to be used (for example if the endpoint doesn't wish to use the | going to be used (for example if the endpoint doesn't wish to use the | |||
| dynamic table, or if the maximum size of the dynamic table permitted | dynamic table, or if the maximum size of the dynamic table permitted | |||
| by the peer is zero). | by the peer is zero). | |||
| An endpoint MAY avoid creating its own decoder stream if the maximum | An endpoint MAY avoid creating its own decoder stream if the maximum | |||
| size of its own dynamic table is zero. | size of its own dynamic table is zero. | |||
| skipping to change at page 16, line 14 ¶ | skipping to change at page 16, line 14 ¶ | |||
| as a string literal. For entries which already exist in the dynamic | as a string literal. For entries which already exist in the dynamic | |||
| table, the full entry can also be used by reference, creating a | table, the full entry can also be used by reference, creating a | |||
| duplicate entry. | duplicate entry. | |||
| This section specifies the following encoder instructions. | This section specifies the following encoder instructions. | |||
| 4.3.1. Set Dynamic Table Capacity | 4.3.1. Set Dynamic Table Capacity | |||
| An encoder informs the decoder of a change to the dynamic table | An encoder informs the decoder of a change to the dynamic table | |||
| capacity using an instruction which begins with the '001' three-bit | capacity using an instruction which begins with the '001' three-bit | |||
| pattern. The new dynamic table capacity is represented as an integer | pattern. This is followed by the new dynamic table capacity | |||
| with a 5-bit prefix (see Section 5.1 of [RFC7541]). | represented as an integer with a 5-bit prefix (see Section 4.1.1). | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 0 | 1 | Capacity (5+) | | | 0 | 0 | 1 | Capacity (5+) | | |||
| +---+---+---+-------------------+ | +---+---+---+-------------------+ | |||
| Figure 2: Set Dynamic Table Capacity | Figure 2: Set Dynamic Table Capacity | |||
| The new capacity MUST be lower than or equal to the limit described | The new capacity MUST be lower than or equal to the limit described | |||
| in Section 3.2.3. In HTTP/3, this limit is the value of the | in Section 3.2.3. In HTTP/3, this limit is the value of the | |||
| skipping to change at page 16, line 44 ¶ | skipping to change at page 16, line 44 ¶ | |||
| table is not acknowledged as this instruction does not insert an | table is not acknowledged as this instruction does not insert an | |||
| entry. | entry. | |||
| 4.3.2. Insert With Name Reference | 4.3.2. Insert With Name Reference | |||
| An encoder adds an entry to the dynamic table where the header field | An encoder adds an entry to the dynamic table where the header field | |||
| name matches the header field name of an entry stored in the static | name matches the header field name of an entry stored in the static | |||
| or the dynamic table using an instruction that starts with the '1' | or the dynamic table using an instruction that starts with the '1' | |||
| one-bit pattern. The second ("S") bit indicates whether the | one-bit pattern. The second ("S") bit indicates whether the | |||
| reference is to the static or dynamic table. The 6-bit prefix | reference is to the static or dynamic table. The 6-bit prefix | |||
| integer (see Section 5.1 of [RFC7541]) that follows is used to locate | integer (see Section 4.1.1) that follows is used to locate the table | |||
| the table entry for the header name. When S=1, the number represents | entry for the header name. When S=1, the number represents the | |||
| the static table index; when S=0, the number is the relative index of | static table index; when S=0, the number is the relative index of the | |||
| the entry in the dynamic table. | entry in the dynamic table. | |||
| The header name reference is followed by the header field value | The header name reference is followed by the header field value | |||
| represented as a string literal (see Section 5.2 of [RFC7541]). | represented as a string literal (see Section 4.1.2). | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 1 | S | Name Index (6+) | | | 1 | S | Name Index (6+) | | |||
| +---+---+-----------------------+ | +---+---+-----------------------+ | |||
| | H | Value Length (7+) | | | H | Value Length (7+) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | Value String (Length bytes) | | | Value String (Length bytes) | | |||
| +-------------------------------+ | +-------------------------------+ | |||
| Insert Header Field -- Indexed Name | Insert Header Field -- Indexed Name | |||
| 4.3.3. Insert Without Name Reference | 4.3.3. Insert Without Name Reference | |||
| An encoder adds an entry to the dynamic table where both the header | An encoder adds an entry to the dynamic table where both the header | |||
| field name and the header field value are represented as string | field name and the header field value are represented as string | |||
| literals (see Section 4.1) using an instruction that starts with the | literals using an instruction that starts with the '01' two-bit | |||
| '01' two-bit pattern. | pattern. | |||
| The name is represented as a 6-bit prefix string literal, while the | This is followed by the name represented as a 6-bit prefix string | |||
| value is represented as an 8-bit prefix string literal. | literal, and the value represented as an 8-bit prefix string literal | |||
| (see Section 4.1.2). | ||||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 1 | H | Name Length (5+) | | | 0 | 1 | H | Name Length (5+) | | |||
| +---+---+---+-------------------+ | +---+---+---+-------------------+ | |||
| | Name String (Length bytes) | | | Name String (Length bytes) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | H | Value Length (7+) | | | H | Value Length (7+) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | Value String (Length bytes) | | | Value String (Length bytes) | | |||
| +-------------------------------+ | +-------------------------------+ | |||
| Insert Header Field -- New Name | Insert Header Field -- New Name | |||
| 4.3.4. Duplicate | 4.3.4. Duplicate | |||
| An encoder duplicates an existing entry in the dynamic table using an | An encoder duplicates an existing entry in the dynamic table using an | |||
| instruction that starts with the '000' three-bit pattern. The | instruction that begins with the '000' three-bit pattern. This is | |||
| relative index of the existing entry is represented as an integer | followed by the relative index of the existing entry represented as | |||
| with a 5-bit prefix. | an integer with a 5-bit prefix (see Section 4.1.1. | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 0 | 0 | Index (5+) | | | 0 | 0 | 0 | Index (5+) | | |||
| +---+---+---+-------------------+ | +---+---+---+-------------------+ | |||
| Figure 3: Duplicate | Figure 3: Duplicate | |||
| The existing entry is re-inserted into the dynamic table without | The existing entry is re-inserted into the dynamic table without | |||
| resending either the name or the value. This is useful to mitigate | resending either the name or the value. This is useful to mitigate | |||
| skipping to change at page 18, line 26 ¶ | skipping to change at page 18, line 26 ¶ | |||
| processing of the client's header blocks and table updates, and the | processing of the client's header blocks and table updates, and the | |||
| client informs the server about the processing of the server's header | client informs the server about the processing of the server's header | |||
| blocks and table updates. | blocks and table updates. | |||
| This section specifies the following decoder instructions. | This section specifies the following decoder instructions. | |||
| 4.4.1. Header Acknowledgement | 4.4.1. Header Acknowledgement | |||
| After processing a header block whose declared Required Insert Count | After processing a header block whose declared Required Insert Count | |||
| is not zero, the decoder emits a Header Acknowledgement instruction. | is not zero, the decoder emits a Header Acknowledgement instruction. | |||
| The instruction begins with the '1' one-bit pattern and includes the | The instruction begins with the '1' one-bit pattern which is followed | |||
| header block's associated stream ID, encoded as a 7-bit prefix | by the header block's associated stream ID encoded as a 7-bit prefix | |||
| integer. It is used by the peer's encoder to know when it is safe to | integer (see Section 4.1.1). | |||
| evict an entry (Section 2.1.2), and possibly update the Known | ||||
| Received Count (Section 2.1.4). | This instruction is used as described in Section 2.1.4 and in | |||
| Section 2.2.2. | ||||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 1 | Stream ID (7+) | | | 1 | Stream ID (7+) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| Figure 4: Header Acknowledgement | Figure 4: Header Acknowledgement | |||
| If an encoder receives a Header Acknowledgement instruction referring | If an encoder receives a Header Acknowledgement instruction referring | |||
| to a stream on which every header block with a non-zero Required | to a stream on which every header block with a non-zero Required | |||
| Insert Count has already been acknowledged, that MUST be treated as a | Insert Count has already been acknowledged, that MUST be treated as a | |||
| connection error of type "HTTP_QPACK_DECODER_STREAM_ERROR". | connection error of type "HTTP_QPACK_DECODER_STREAM_ERROR". | |||
| 4.4.2. Stream Cancellation | 4.4.2. Stream Cancellation | |||
| When a stream is reset or reading is abandoned, the decoder emits a | When a stream is reset or reading is abandoned, the decoder emits a | |||
| Stream Cancellation instruction. The instruction begins with the | Stream Cancellation instruction. The instruction begins with the | |||
| '01' two-bit pattern. The instruction includes the stream ID of the | '01' two-bit pattern, which is followed by the stream ID of the | |||
| affected stream encoded as a 6-bit prefix integer. See | affected stream encoded as a 6-bit prefix integer. | |||
| Section 2.2.2. | ||||
| This instruction is used as described in Section 2.2.2. | ||||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 1 | Stream ID (6+) | | | 0 | 1 | Stream ID (6+) | | |||
| +---+---+-----------------------+ | +---+---+-----------------------+ | |||
| Figure 5: Stream Cancellation | Figure 5: Stream Cancellation | |||
| 4.4.3. Insert Count Increment | 4.4.3. Insert Count Increment | |||
| The Insert Count Increment instruction begins with the '00' two-bit | The Insert Count Increment instruction begins with the '00' two-bit | |||
| pattern. The instruction specifies the total number of dynamic table | pattern, followed by the Increment encoded as a 6-bit prefix integer. | |||
| inserts and duplications since the last Insert Count Increment or | The value of the Increment is the total number of dynamic table | |||
| Header Acknowledgement that increased the Known Received Count for | insertions and duplications processed by the decoder since the last | |||
| the dynamic table (see Section 2.1.4). The Increment field is | time it sent a Header Acknowledgement instruction that increased the | |||
| encoded as a 6-bit prefix integer. The encoder uses this value to | Known Received Count (see Section 2.1.4) or an Insert Count Increment | |||
| determine which table entries might cause a stream to become blocked, | instruction. The encoder uses this value to update the Known | |||
| as described in Section 2.2.2. | Received Count, as described in Section 2.2.2. | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 0 | Increment (6+) | | | 0 | 0 | Increment (6+) | | |||
| +---+---+-----------------------+ | +---+---+-----------------------+ | |||
| Figure 6: Insert Count Increment | Figure 6: Insert Count Increment | |||
| An encoder that receives an Increment field equal to zero or one that | An encoder that receives an Increment field equal to zero or one that | |||
| increases the Known Received Count beyond what the encoder has sent | increases the Known Received Count beyond what the encoder has sent | |||
| MUST treat this as a connection error of type | MUST treat this as a connection error of type | |||
| "HTTP_QPACK_DECODER_STREAM_ERROR". | "HTTP_QPACK_DECODER_STREAM_ERROR". | |||
| 4.5. Header Block Representations | 4.5. Header Block Representations | |||
| Header blocks contain compressed representations of header lists and | A header block consists of a prefix and a possibly empty sequence of | |||
| are carried in frames on streams defined by the enclosing protocol. | representations defined in this section. Each representation | |||
| These representations reference the static table, or dynamic table in | corresponds to a single header field. These representations | |||
| a particular state without modifying it. | reference the static table or the dynamic table in a particular | |||
| state, but do not modify that state. | ||||
| Header blocks are carried in frames on streams defined by the | ||||
| enclosing protocol. | ||||
| 4.5.1. Header Block Prefix | 4.5.1. Header Block Prefix | |||
| Each header block is prefixed with two integers. The Required Insert | Each header block is prefixed with two integers. The Required Insert | |||
| Count is encoded as an integer with an 8-bit prefix after the | Count is encoded as an integer with an 8-bit prefix after the | |||
| encoding described in Section 4.5.1.1). The Base is encoded as sign- | encoding described in Section 4.5.1.1). The Base is encoded as sign- | |||
| and-modulus integer, using a single sign bit and a value with a 7-bit | and-modulus integer, using a single sign bit and a value with a 7-bit | |||
| prefix (see Section 4.5.1.2). | prefix (see Section 4.5.1.2). | |||
| These two values are followed by representations for compressed | These two values are followed by representations for compressed | |||
| skipping to change at page 21, line 21 ¶ | skipping to change at page 21, line 24 ¶ | |||
| MaxValue = TotalNumberOfInserts + MaxEntries | MaxValue = TotalNumberOfInserts + MaxEntries | |||
| # MaxWrapped is the largest possible value of | # MaxWrapped is the largest possible value of | |||
| # ReqInsertCount that is 0 mod 2*MaxEntries | # ReqInsertCount that is 0 mod 2*MaxEntries | |||
| MaxWrapped = floor(MaxValue / FullRange) * FullRange | MaxWrapped = floor(MaxValue / FullRange) * FullRange | |||
| ReqInsertCount = MaxWrapped + EncodedInsertCount - 1 | ReqInsertCount = MaxWrapped + EncodedInsertCount - 1 | |||
| # If ReqInsertCount exceeds MaxValue, the Encoder's value | # If ReqInsertCount exceeds MaxValue, the Encoder's value | |||
| # must have wrapped one fewer time | # must have wrapped one fewer time | |||
| if ReqInsertCount > MaxValue: | if ReqInsertCount > MaxValue: | |||
| if ReqInsertCount < FullRange: | if ReqInsertCount <= FullRange: | |||
| Error | Error | |||
| ReqInsertCount -= FullRange | ReqInsertCount -= FullRange | |||
| # Value of 0 must be encoded as 0. | ||||
| if ReqInsertCount == 0: | ||||
| Error | ||||
| For example, if the dynamic table is 100 bytes, then the Required | For example, if the dynamic table is 100 bytes, then the Required | |||
| Insert Count will be encoded modulo 6. If a decoder has received 10 | Insert Count will be encoded modulo 6. If a decoder has received 10 | |||
| inserts, then an encoded value of 3 indicates that the Required | inserts, then an encoded value of 3 indicates that the Required | |||
| Insert Count is 9 for the header block. | Insert Count is 9 for the header block. | |||
| 4.5.1.2. Base | 4.5.1.2. Base | |||
| The "Base" is used to resolve references in the dynamic table as | The "Base" is used to resolve references in the dynamic table as | |||
| described in Section 3.2.5. | described in Section 3.2.5. | |||
| skipping to change at page 22, line 18 ¶ | skipping to change at page 22, line 25 ¶ | |||
| might set Required Insert Count and the Base to the same value. In | might set Required Insert Count and the Base to the same value. In | |||
| such case, both the sign bit and the Delta Base will be set to zero. | such case, both the sign bit and the Delta Base will be set to zero. | |||
| A header block that does not reference the dynamic table can use any | A header block that does not reference the dynamic table can use any | |||
| value for the Base; setting Delta Base to zero is the most efficient | value for the Base; setting Delta Base to zero is the most efficient | |||
| encoding. | encoding. | |||
| For example, with a Required Insert Count of 9, a decoder receives a | For example, with a Required Insert Count of 9, a decoder receives a | |||
| S bit of 1 and a Delta Base of 2. This sets the Base to 6 and | S bit of 1 and a Delta Base of 2. This sets the Base to 6 and | |||
| enables post-base indexing for three entries. In this example, a | enables post-base indexing for three entries. In this example, a | |||
| regular index of 1 refers to the 5th entry that was added to the | relative index of 1 refers to the 5th entry that was added to the | |||
| table; a post-base index of 1 refers to the 8th entry. | table; a post-base index of 1 refers to the 8th entry. | |||
| 4.5.2. Indexed Header Field | 4.5.2. Indexed Header Field | |||
| An indexed header field representation identifies an entry in either | An indexed header field representation identifies an entry in either | |||
| the static table or the dynamic table and causes that header field to | the static table or the dynamic table and causes that header field to | |||
| be added to the decoded header list, as described in Section 3.2 of | be added to the decoded header list, as described in Section 3.2 of | |||
| [RFC7541]. | [RFC7541]. | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 1 | S | Index (6+) | | | 1 | S | Index (6+) | | |||
| +---+---+-----------------------+ | +---+---+-----------------------+ | |||
| Indexed Header Field | Indexed Header Field | |||
| If the entry is in the static table, or in the dynamic table with an | If the entry is in the static table, or in the dynamic table with an | |||
| absolute index less than the Base, this representation starts with | absolute index less than the Base, this representation starts with | |||
| the '1' 1-bit pattern, followed by the "S" bit indicating whether the | the '1' 1-bit pattern, followed by the "S" bit indicating whether the | |||
| reference is into the static or dynamic table. The 6-bit prefix | reference is into the static or dynamic table. The 6-bit prefix | |||
| integer (see Section 5.1 of [RFC7541]) that follows is used to locate | integer (see Section 4.1.1) that follows is used to locate the table | |||
| the table entry for the header name. When S=1, the number represents | entry for the header field. When S=1, the number represents the | |||
| the static table index; when S=0, the number is the relative index of | static table index; when S=0, the number is the relative index of the | |||
| the entry in the dynamic table. | entry in the dynamic table. | |||
| 4.5.3. Indexed Header Field With Post-Base Index | 4.5.3. Indexed Header Field With Post-Base Index | |||
| If the entry is in the dynamic table with an absolute index greater | If the entry is in the dynamic table with an absolute index greater | |||
| than or equal to the Base, the representation starts with the '0001' | than or equal to the Base, the representation starts with the '0001' | |||
| 4-bit pattern, followed by the post-base index (see Section 3.2.6) of | 4-bit pattern, followed by the post-base index (see Section 3.2.6) of | |||
| the matching header field, represented as an integer with a 4-bit | the matching header field, represented as an integer with a 4-bit | |||
| prefix (see Section 5.1 of [RFC7541]). | prefix (see Section 4.1.1). | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 0 | 0 | 1 | Index (4+) | | | 0 | 0 | 0 | 1 | Index (4+) | | |||
| +---+---+---+---+---------------+ | +---+---+---+---+---------------+ | |||
| Indexed Header Field with Post-Base Index | Indexed Header Field with Post-Base Index | |||
| 4.5.4. Literal Header Field With Name Reference | 4.5.4. Literal Header Field With Name Reference | |||
| A literal header field with a name reference represents a header | A literal header field with a name reference represents a header | |||
| where the header field name matches the header field name of an entry | where the header field name matches the header field name of an entry | |||
| stored in the static table or the dynamic table. | stored in the static table or the dynamic table. | |||
| If the entry is in the static table, or in the dynamic table with an | If the entry is in the static table, or in the dynamic table with an | |||
| absolute index less than the Base, this representation starts with | absolute index less than the Base, this representation starts with | |||
| the '01' two-bit pattern. | the '01' two-bit pattern. | |||
| Only the header field name stored in the static or dynamic table is | ||||
| used. Any header field value MUST be ignored. | ||||
| The following bit, 'N', indicates whether an intermediary is | The following bit, 'N', indicates whether an intermediary is | |||
| permitted to add this header to the dynamic header table on | permitted to add this header to the dynamic header table on | |||
| subsequent hops. When the 'N' bit is set, the encoded header MUST | subsequent hops. When the 'N' bit is set, the encoded header MUST | |||
| always be encoded with a literal representation. In particular, when | always be encoded with a literal representation. In particular, when | |||
| a peer sends a header field that it received represented as a literal | a peer sends a header field that it received represented as a literal | |||
| header field with the 'N' bit set, it MUST use a literal | header field with the 'N' bit set, it MUST use a literal | |||
| representation to forward this header field. This bit is intended | representation to forward this header field. This bit is intended | |||
| for protecting header field values that are not to be put at risk by | for protecting header field values that are not to be put at risk by | |||
| compressing them (see Section 7.1 of [RFC7541] for more details). | compressing them (see Section 7 for more details). | |||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 1 | N | S |Name Index (4+)| | | 0 | 1 | N | S |Name Index (4+)| | |||
| +---+---+---+---+---------------+ | +---+---+---+---+---------------+ | |||
| | H | Value Length (7+) | | | H | Value Length (7+) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | Value String (Length bytes) | | | Value String (Length bytes) | | |||
| +-------------------------------+ | +-------------------------------+ | |||
| Literal Header Field With Name Reference | Literal Header Field With Name Reference | |||
| The fourth ("S") bit indicates whether the reference is to the static | The fourth ("S") bit indicates whether the reference is to the static | |||
| or dynamic table. The 4-bit prefix integer (see Section 5.1 of | or dynamic table. The 4-bit prefix integer (see Section 4.1.1) that | |||
| [RFC7541]) that follows is used to locate the table entry for the | follows is used to locate the table entry for the header name. When | |||
| header name. When S=1, the number represents the static table index; | S=1, the number represents the static table index; when S=0, the | |||
| when S=0, the number is the relative index of the entry in the | number is the relative index of the entry in the dynamic table. | |||
| dynamic table. | ||||
| Only the header field name is taken from the dynamic table entry; the | ||||
| header field value is encoded as an 8-bit prefix string literal (see | ||||
| Section 4.1.2). | ||||
| 4.5.5. Literal Header Field With Post-Base Name Reference | 4.5.5. Literal Header Field With Post-Base Name Reference | |||
| If the name entry is in the dynamic table with an absolute index | A literal header field with post-base name reference represents a | |||
| greater than or equal to the Base, the representation starts with the | header field where the name matches the header field name of a | |||
| '0000' four-bit pattern. The fifth bit is the 'N' bit as described | dynamic table entry with an absolute index greater than or equal to | |||
| in Section 4.5.4. Finally, the header field name is represented | the Base. | |||
| using the post-base index of that entry (see Section 3.2.6) encoded | ||||
| as an integer with a 3-bit prefix. | This representation starts with the '0000' four-bit pattern. The | |||
| fifth bit is the 'N' bit as described in Section 4.5.4. This is | ||||
| followed by a post-base index of the dynamic table entry (see | ||||
| Section 3.2.6) encoded as an integer with a 3-bit prefix (see | ||||
| Section 4.1.1). | ||||
| Only the header field name is taken from the dynamic table entry; the | ||||
| header field value is encoded as an 8-bit prefix string literal (see | ||||
| Section 4.1.2). | ||||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 0 | 0 | 0 | N |NameIdx(3+)| | | 0 | 0 | 0 | 0 | N |NameIdx(3+)| | |||
| +---+---+---+---+---+-----------+ | +---+---+---+---+---+-----------+ | |||
| | H | Value Length (7+) | | | H | Value Length (7+) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | Value String (Length bytes) | | | Value String (Length bytes) | | |||
| +-------------------------------+ | +-------------------------------+ | |||
| Literal Header Field With Post-Base Name Reference | Literal Header Field With Post-Base Name Reference | |||
| 4.5.6. Literal Header Field Without Name Reference | 4.5.6. Literal Header Field Without Name Reference | |||
| An addition to the header table where both the header field name and | The literal header field without name reference representation | |||
| the header field value are represented as string literals (see | encodes a header field name and header field value as string | |||
| Section 4.1) starts with the '001' three-bit pattern. | literals. | |||
| The fourth bit, 'N', indicates whether an intermediary is permitted | ||||
| to add this header to the dynamic header table on subsequent hops. | ||||
| When the 'N' bit is set, the encoded header MUST always be encoded | ||||
| with a literal representation. In particular, when a peer sends a | ||||
| header field that it received represented as a literal header field | ||||
| with the 'N' bit set, it MUST use a literal representation to forward | ||||
| this header field. This bit is intended for protecting header field | ||||
| values that are not to be put at risk by compressing them (see | ||||
| Section 7.1 of [RFC7541] for more details). | ||||
| The name is represented as a 4-bit prefix string literal, while the | This representation begins with the '001' three-bit pattern. The | |||
| value is represented as an 8-bit prefix string literal. | fourth 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 an 8-bit prefix string literal (see | ||||
| Section 4.1.2). | ||||
| 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7 | |||
| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ | |||
| | 0 | 0 | 1 | N | H |NameLen(3+)| | | 0 | 0 | 1 | N | H |NameLen(3+)| | |||
| +---+---+---+---+---+-----------+ | +---+---+---+---+---+-----------+ | |||
| | Name String (Length bytes) | | | Name String (Length bytes) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | H | Value Length (7+) | | | H | Value Length (7+) | | |||
| +---+---------------------------+ | +---+---------------------------+ | |||
| | Value String (Length bytes) | | | Value String (Length bytes) | | |||
| skipping to change at page 26, line 5 ¶ | skipping to change at page 25, line 49 ¶ | |||
| HTTP_QPACK_ENCODER_STREAM_ERROR (0x201): The decoder failed to | HTTP_QPACK_ENCODER_STREAM_ERROR (0x201): The decoder failed to | |||
| interpret an encoder instruction received on the encoder stream. | interpret an encoder instruction received on the encoder stream. | |||
| HTTP_QPACK_DECODER_STREAM_ERROR (0x202): The encoder failed to | HTTP_QPACK_DECODER_STREAM_ERROR (0x202): The encoder failed to | |||
| interpret a decoder instruction received on the decoder stream. | interpret a decoder instruction received on the decoder stream. | |||
| 7. Security Considerations | 7. Security Considerations | |||
| TBD. | TBD. | |||
| While the negotiated limit on the dynamic table size accounts for | ||||
| much of the memory that can be consumed by a QPACK implementation, | ||||
| data which cannot be immediately sent due to flow control is not | ||||
| affected by this limit. Implementations should limit the size of | ||||
| unsent data, especially on the decoder stream where flexibility to | ||||
| choose what to send is limited. Possible responses to an excess of | ||||
| unsent data might include limiting the ability of the peer to open | ||||
| new streams, reading only from the encoder stream, or closing the | ||||
| connection. | ||||
| 8. IANA Considerations | 8. IANA Considerations | |||
| 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 | | | Setting Name | Code | Specification | Default | | |||
| +--------------------------+------+---------------+ | +--------------------------+------+---------------+---------+ | |||
| | QPACK_MAX_TABLE_CAPACITY | 0x1 | Section 5 | | | QPACK_MAX_TABLE_CAPACITY | 0x1 | Section 5 | 0 | | |||
| | | | | | | | | | | | |||
| | QPACK_BLOCKED_STREAMS | 0x7 | Section 5 | | | QPACK_BLOCKED_STREAMS | 0x7 | Section 5 | 0 | | |||
| +--------------------------+------+---------------+ | +--------------------------+------+---------------+---------+ | |||
| 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]. | |||
| +----------------------+------+---------------+--------+ | +----------------------+------+---------------+--------+ | |||
| | Stream Type | Code | Specification | Sender | | | Stream Type | Code | Specification | Sender | | |||
| +----------------------+------+---------------+--------+ | +----------------------+------+---------------+--------+ | |||
| skipping to change at page 27, line 28 ¶ | skipping to change at page 27, line 28 ¶ | |||
| | HTTP_QPACK_DECODER_STREAM_E | 0x202 | Error on the | Section 6 | | | HTTP_QPACK_DECODER_STREAM_E | 0x202 | Error on the | Section 6 | | |||
| | RROR | | decoder | | | | RROR | | 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-21 (work in progress), | (HTTP/3)", draft-ietf-quic-http-23 (work in progress), | |||
| July 2019. | September 2019. | |||
| [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", draft-ietf-quic- | |||
| transport-20 (work in progress), July 2019. | transport-23 (work in progress), September 2019. | |||
| [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>. | |||
| skipping to change at page 35, line 10 ¶ | skipping to change at page 35, line 10 ¶ | |||
| encodeInteger(prefixBuffer, 0x80, | encodeInteger(prefixBuffer, 0x80, | |||
| largestReference - baseIndex, 7) | largestReference - baseIndex, 7) | |||
| return controlBuffer, prefixBuffer + streamBuffer | return controlBuffer, 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-08 | C.1. Since draft-ietf-quic-qpack-09 | |||
| o Decoders MUST emit Header Acknowledgements (#2939) | ||||
| o Updated error code for multiple encoder or decoder streams (#2970) | ||||
| o Added explicit defaults for new SETTINGS (#2974) | ||||
| C.2. Since draft-ietf-quic-qpack-08 | ||||
| o Endpoints are permitted to create encoder and decoder streams even | o 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) | |||
| o Maximum values for settings removed (#2766, #2767) | o Maximum values for settings removed (#2766, #2767) | |||
| C.2. Since draft-ietf-quic-qpack-06 | C.3. Since draft-ietf-quic-qpack-06 | |||
| o Clarify initial dynamic table capacity maximums (#2276, #2330, | o Clarify initial dynamic table capacity maximums (#2276, #2330, | |||
| #2330) | #2330) | |||
| C.3. Since draft-ietf-quic-qpack-05 | C.4. Since draft-ietf-quic-qpack-05 | |||
| o Introduced the terms dynamic table capacity and maximum dynamic | o Introduced the terms dynamic table capacity and maximum dynamic | |||
| table capacity. | table capacity. | |||
| o Renamed SETTINGS_HEADER_TABLE_SIZE to | o Renamed SETTINGS_HEADER_TABLE_SIZE to | |||
| SETTINGS_QPACK_MAX_TABLE_CAPACITY. | SETTINGS_QPACK_MAX_TABLE_CAPACITY. | |||
| C.4. Since draft-ietf-quic-qpack-04 | C.5. Since draft-ietf-quic-qpack-04 | |||
| o Changed calculation of Delta Base Index to avoid an illegal value | o Changed calculation of Delta Base Index to avoid an illegal value | |||
| (#2002, #2005) | (#2002, #2005) | |||
| C.5. Since draft-ietf-quic-qpack-03 | C.6. Since draft-ietf-quic-qpack-03 | |||
| o Change HTTP settings defaults (#2038) | o Change HTTP settings defaults (#2038) | |||
| o Substantial editorial reorganization | o Substantial editorial reorganization | |||
| C.6. Since draft-ietf-quic-qpack-02 | C.7. Since draft-ietf-quic-qpack-02 | |||
| o Largest Reference encoded modulo MaxEntries (#1763) | o Largest Reference encoded modulo MaxEntries (#1763) | |||
| o New Static Table (#1355) | o New Static Table (#1355) | |||
| o Table Size Update with Insert Count=0 is a connection error | o Table Size Update with Insert Count=0 is a connection error | |||
| (#1762) | (#1762) | |||
| o Stream Cancellations are optional when | o Stream Cancellations are optional when | |||
| SETTINGS_HEADER_TABLE_SIZE=0 (#1761) | SETTINGS_HEADER_TABLE_SIZE=0 (#1761) | |||
| skipping to change at page 36, line 15 ¶ | skipping to change at page 36, line 27 ¶ | |||
| o Implementations must handle 62 bit integers (#1760) | o Implementations must handle 62 bit integers (#1760) | |||
| o Different error types for each QPACK stream, other changes to | o Different error types for each QPACK stream, other changes to | |||
| error handling (#1726) | error handling (#1726) | |||
| o Preserve header field order (#1725) | o Preserve header field order (#1725) | |||
| o Initial table size is the maximum permitted when table is first | o Initial table size is the maximum permitted when table is first | |||
| usable (#1642) | usable (#1642) | |||
| C.7. Since draft-ietf-quic-qpack-01 | C.8. Since draft-ietf-quic-qpack-01 | |||
| o Only header blocks that reference the dynamic table are | o Only header blocks that reference the dynamic table are | |||
| acknowledged (#1603, #1605) | acknowledged (#1603, #1605) | |||
| C.8. Since draft-ietf-quic-qpack-00 | C.9. Since draft-ietf-quic-qpack-00 | |||
| o Renumbered instructions for consistency (#1471, #1472) | o Renumbered instructions for consistency (#1471, #1472) | |||
| o Decoder is allowed to validate largest reference (#1404, #1469) | o Decoder is allowed to validate largest reference (#1404, #1469) | |||
| o Header block acknowledgments also acknowledge the associated | o Header block acknowledgments also acknowledge the associated | |||
| largest reference (#1370, #1400) | largest reference (#1370, #1400) | |||
| o Added an acknowledgment for unread streams (#1371, #1400) | o Added an acknowledgment for unread streams (#1371, #1400) | |||
| o Removed framing from encoder stream (#1361,#1467) | o Removed framing from encoder stream (#1361,#1467) | |||
| o Control streams use typed unidirectional streams rather than fixed | o Control streams use typed unidirectional streams rather than fixed | |||
| stream IDs (#910,#1359) | stream IDs (#910,#1359) | |||
| C.9. Since draft-ietf-quic-qcram-00 | C.10. Since draft-ietf-quic-qcram-00 | |||
| o Separate instruction sets for table updates and header blocks | o Separate instruction sets for table updates and header blocks | |||
| (#1235, #1142, #1141) | (#1235, #1142, #1141) | |||
| o Reworked indexing scheme (#1176, #1145, #1136, #1130, #1125, | o Reworked indexing scheme (#1176, #1145, #1136, #1130, #1125, | |||
| #1314) | #1314) | |||
| o Added mechanisms that support one-pass encoding (#1138, #1320) | o Added mechanisms that support one-pass encoding (#1138, #1320) | |||
| o Added a setting to control the number of blocked decoders (#238, | o Added a setting to control the number of blocked decoders (#238, | |||
| End of changes. 49 change blocks. | ||||
| 128 lines changed or deleted | 163 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/ | ||||