Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.5.8, 6.8.1
-
None
Description
The Qt implementation is missing a step in the negotiation of a new HPACK dynamic table size which causes HTTP2 connections to fail.
When an HTTP2 peer sends a SETTINGS_HEADER_TABLE_SIZE setting, the Qt implementation immediately updates the encoder's dynamic table size and responds with a settings ACK, but it never notifies the peer of the new table size.
From RFC 7541 section 4.2:
"...dynamic table size update MUST occur at the beginning of the first header block following the change to the dynamic table size."
As a result, the peer decoder's dynamic table size is never updated - now the decoder's dynamic table and the Qt implementation encoder's dynamic table are out of sync and they won't agree on index references. Unknown references are required to be treated as an error leading to connection failures.
It seems like an accidental oversight. There is a method HPack.Encoder::encodeSizeUpdate() in qtbase/src/network/access/http2/hpack.cpp which was written for this purpose, but it's not called anywhere.
Though as it's written in the LTS branches, it would update the encoder's table size and write the updated table size notification in the same step, but I don't think you can combine these. The HTTP2 settings ACK needs to be transmitted first and then the size notification entry must wait until the next header block is written.
Attachments
Issue Links
- duplicates
-
QTBUG-132277 Qt fails to adhere to HTTP/2 HPACK dynamic table size changes
-
- Closed
-