Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid having multiple ways to encode Delta Base Index of zero #2005

Merged
merged 2 commits into from
Dec 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions draft-ietf-quic-qpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ indicates that the Base Index is less than the Largest Reference. That is:
if sign == 0:
baseIndex = largestReference + deltaBaseIndex
else:
baseIndex = largestReference - deltaBaseIndex
baseIndex = largestReference - deltaBaseIndex - 1
~~~

A single-pass encoder determines the absolute value of Base Index before
Expand All @@ -870,10 +870,8 @@ not insert any new entries, Base Index will be greater than the Largest
Reference, so the delta will be positive and the sign bit is set to 0.

An encoder that produces table updates before encoding a header block might set
Largest Reference and Base Index to the same value. When Largest Reference and
Base Index are equal, the Delta Base Index is encoded with a zero sign bit. A
sign bit set to 1 when the Delta Base Index is 0 MUST be treated as a decoder
error.
Largest Reference and Base Index to the same value. In such case, both the sign
bit and the Delta Base Index will be set to zero.

A header block that does not reference the dynamic table can use any value for
Base Index; setting both Largest Reference and Base Index to zero is the most
Expand Down