QPack: Incorrect mapping of relative indices to absolute indices in field line representations
AlekseiEfimov opened this issue · 5 comments
Relative dynamic table entry indices in field line representations are mapped to absolute indices values according to the following statement from RFC 9204 Section 3.2.5 "Relative Indexing":
In a field line representation, a relative index of 0 refers to the entry with absolute index equal to Base - 1.
The usages of QpackDecoderDynamicTable::getEntryRelativeEncodedField
in QpackDecoder
need to be fixed to use the correct index mapping, eg calculate absolute index with base - idx - 1
instead of base - idx
.
Same issue needs to be fixed on the QpackEncoder
side, when encoding indexed field lines, and literal field lines with name reference.
@AlekseiEfimov want to do a PR ? Good catch!
@AlekseiEfimov ping
@normanmaurer
Sorry for not getting back to you sooner. Regarding the PR: I'm not planning to work on it - just wanted to report the issue.
@AlekseiEfimov can you have a look at #250 ? I think this should fix it.
The fix looks right to me.