Skip to content

Fix SETTINGS_HEADER_TABLE_SIZE handling in OkHttp transport#12818

Open
kenkangxgwe wants to merge 1 commit into
grpc:masterfrom
kenkangxgwe:hpack-fix
Open

Fix SETTINGS_HEADER_TABLE_SIZE handling in OkHttp transport#12818
kenkangxgwe wants to merge 1 commit into
grpc:masterfrom
kenkangxgwe:hpack-fix

Conversation

@kenkangxgwe
Copy link
Copy Markdown
Contributor

In the OkHttp transport, the client and server were not applying the SETTINGS_HEADER_TABLE_SIZE setting received from the peer to their HPACK encoder (Hpack.Writer). This could lead to protocol errors if the peer requested a smaller table size than the default (4096 octets).

This change modifies Http2.Writer.ackSettings to resize the HPACK writer table when this setting is received, ensuring compliance with peer limits and triggering the required Dynamic Table Size Update in the next HEADERS frame.

In the OkHttp transport, the client and server were not applying the
SETTINGS_HEADER_TABLE_SIZE setting received from the peer to their HPACK
encoder (Hpack.Writer). This could lead to protocol errors if the peer
requested a smaller table size than the default (4096 octets).

This change modifies Http2.Writer.ackSettings to resize the HPACK writer
table when this setting is received, ensuring compliance with peer limits
and triggering the required Dynamic Table Size Update in the next HEADERS
frame.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant