Skip to content

Commit

Permalink
Merge branch 'master' into zerocid
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthomson committed Aug 16, 2019
2 parents 95d1f8a + dd54111 commit 5e388ac
Show file tree
Hide file tree
Showing 7 changed files with 881 additions and 640 deletions.
384 changes: 197 additions & 187 deletions draft-ietf-quic-http.md

Large diffs are not rendered by default.

40 changes: 19 additions & 21 deletions draft-ietf-quic-invariants.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ version-specific semantics are marked with an X.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version (32) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|DCIL(4)|SCIL(4)|
| DCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Connection ID (0/32..144) ...
| Destination Connection ID (0..2040) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0/32..144) ...
| SCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0..2040) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Expand All @@ -159,21 +161,15 @@ All other bits in that byte are version specific.

The next four bytes include a 32-bit Version field (see {{version}}).

The next byte contains the length in bytes of the two Connection IDs (see
{{connection-id}}) that follow. Each length is encoded as a 4-bit unsigned
integer. The length of the Destination Connection ID (DCIL) occupies the high
bits of the byte and the length of the Source Connection ID (SCIL) occupies the
low bits of the byte. An encoded length of 0 indicates that the connection ID
is also 0 bytes in length. Non-zero encoded lengths are increased by 3 to get
the full length of the connection ID; the final value is therefore either 0 or
between 4 and 18 bytes in length (inclusive). For example, a byte with the
value 0xe0 describes a 17 byte Destination Connection ID and a zero byte Source
Connection ID.

The connection ID lengths are followed by two connection IDs. The connection
ID associated with the recipient of the packet (the Destination Connection ID)
is followed by the connection ID associated with the sender of the packet (the
Source Connection ID).
The next byte contains the length in bytes of the Destination Connection ID (see
{{connection-id}}) field that follows it. This length is encoded as an 8-bit
unsigned integer. The Destination Connection ID field follows the DCID Len
field and is between 0 and 255 bytes in length.

The next byte contains the length in bytes
of the Source Connection ID field that follows it. This length is encoded as
a 8-bit unsigned integer. The Source Connection ID field follows the SCID Len
field and is between 0 and 255 bytes in length.

The remainder of the packet contains version-specific content.

Expand Down Expand Up @@ -252,11 +248,13 @@ Version field, which is set to 0x00000000.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version (32) = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|DCIL(4)|SCIL(4)|
| DCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Connection ID (0..2040) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Connection ID (0/32..144) ...
| SCID Len (8) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Connection ID (0/32..144) ...
| Source Connection ID (0..2040) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Supported Version 1 (32) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Expand Down
41 changes: 26 additions & 15 deletions draft-ietf-quic-qpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ Absolute Index:

Base:

: A reference point for relative indices. Dynamic references are made relative
to a Base in header blocks.
: A reference point for relative and post-base indices. References to dynamic
table entries in header blocks are relative to a Base.

Insert Count:

Expand Down Expand Up @@ -262,11 +262,15 @@ When the decoder receives a header block with a Required Insert Count greater
than its own Insert Count, the stream cannot be processed immediately, and is
considered "blocked" (see {blocked-decoding}).

The SETTINGS_QPACK_BLOCKED_STREAMS setting (see {{configuration}}) specifies an
upper bound on the number of streams which can be blocked. An encoder MUST limit
the number of streams which could become blocked to the value of
SETTINGS_QPACK_BLOCKED_STREAMS at all times. Note that the decoder might not
become blocked on every stream which risks becoming blocked.
The decoder specifies an upper bound on the number of streams which can be
blocked using the SETTINGS_QPACK_BLOCKED_STREAMS setting (see
{{configuration}}). An encoder MUST limit the number of streams which could
become blocked to the value of SETTINGS_QPACK_BLOCKED_STREAMS at all times.
If an decoder encounters more blocked streams than it 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. If
permitted by the value of SETTINGS_QPACK_BLOCKED_STREAMS, compression efficiency
Expand Down Expand Up @@ -321,24 +325,21 @@ decoder has started reading from the stream.
<!-- doesn't the stream become unblocked when the encoder receives the acks? -->

When processing header blocks, the decoder expects the Required Insert Count to
exactly match the value defined in {{blocked-streams}. If it encounters a
exactly match the value defined in {{blocked-streams}}. If it encounters a
smaller value than expected, it MUST treat this as a connection error of type
HTTP_QPACK_DECOMPRESSION_FAILED (see {{invalid-references}}). If it encounters a
larger value than expected, it MAY treat this as a 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.

### State Synchronization

The decoder signals the following events by emitting decoder instructions
({{decoder-instructions}}) on the decoder stream.

#### Completed Processing of a Header Block

When the decoder finishes decoding a header block containing dynamic table
references, it emits a Header Acknowledgement instruction
After the decoder finishes decoding a header block containing dynamic table
references, it MUST emit a Header Acknowledgement instruction
({{header-acknowledgement}}). A stream may carry multiple header blocks in the
case of intermediate responses, trailers, and pushed requests. The encoder
interprets each Header Acknowledgement instruction as acknowledging the earliest
Expand Down Expand Up @@ -901,9 +902,13 @@ table.
# If ReqInsertCount exceeds MaxValue, the Encoder's value
# must have wrapped one fewer time
if ReqInsertCount > MaxValue:
if ReqInsertCount < FullRange:
if ReqInsertCount <= FullRange:
Error
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 Insert Count
Expand Down Expand Up @@ -945,7 +950,7 @@ the Base; setting Delta Base to zero is the most efficient encoding.

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 enables post-base indexing
for three entries. In this example, a regular index of 1 refers to the 5th
for three entries. In this example, a 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.

Expand Down Expand Up @@ -1325,6 +1330,12 @@ return controlBuffer, prefixBuffer + streamBuffer
> **RFC Editor's Note:** Please remove this section prior to publication of a
> final version of this document.

## Since draft-ietf-quic-qpack-08

- Endpoints are permitted to create encoder and decoder streams even if they
can't use them (#2100, #2529)
- Maximum values for settings removed (#2766, #2767)

## Since draft-ietf-quic-qpack-06

- Clarify initial dynamic table capacity maximums (#2276, #2330, #2330)
Expand Down
Loading

0 comments on commit 5e388ac

Please sign in to comment.