-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
When encoding headers using the HPACK encoder, an incorrect state is restored if an overflow occurs while processing multiple values of the same header name.
The encoder iterates over all values associated with a header name, but only the header iterator position is preserved when an overflow happens. The index of the value currently being processed is not stored.
As a result, if an overflow occurs in the middle of encoding multiple values for a single header, the next call to encode() resumes from the next header entry instead of continuing with the remaining values of the same header. This can cause some header values to be skipped and not encoded.
This issue may lead to incomplete or incorrect HPACK-encoded header blocks when headers contain multiple values and the output buffer is too small.