Skip to content

Skip inserting entries that do not fit in the encoding table - #28

Merged
kazu-yamamoto merged 2 commits into
kazu-yamamoto:masterfrom
wireapp:header-encoding-0-size-table
Jun 10, 2021
Merged

Skip inserting entries that do not fit in the encoding table#28
kazu-yamamoto merged 2 commits into
kazu-yamamoto:masterfrom
wireapp:header-encoding-0-size-table

Conversation

@pcapriotti

Copy link
Copy Markdown
Contributor

This should fix #27. The new tests show that encoding with a 0-size table prevents the encoder from creating indexed fields that point to entries in the dynamic table.

I also reverted the workaround for #16 introduced in PR #17. Tests still pass.

The workaround introduced by kazu-yamamoto#17 makes a server use a default table size
when creating response headers, even if the client requested size 0.

This has the consequence that header entries are incorrectly added to
the table, and can therefore be referenced by successive responses,
causing the client to fail parsing the response.

This patch simply skips adding an entry to the table if it doesn't fit.

@kazu-yamamoto kazu-yamamoto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks excellent!

@kazu-yamamoto
kazu-yamamoto merged commit 7b46da6 into kazu-yamamoto:master Jun 10, 2021
@kazu-yamamoto

Copy link
Copy Markdown
Owner

Thank you for your contribution!
A new version has been released.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 12, 2022
3.0.3
* Return correct status messages in HTTP2 client
  (#31)[kazu-yamamoto/http2#31]
* Follow changes in Aeson 2
  (#32)[kazu-yamamoto/http2#32]
* Make sure connection preface is always sent first
  (#33)[kazu-yamamoto/http2#33]
* Avoid empty data (#34)[kazu-yamamoto/http2#34]

3.0.2
* Skip inserting entries that do not fit in the encoding table
  (#28)[kazu-yamamoto/http2#28]
msk pushed a commit to msk/pkgsrc that referenced this pull request May 11, 2026
3.0.3
* Return correct status messages in HTTP2 client
  (NetBSD#31)[kazu-yamamoto/http2#31]
* Follow changes in Aeson 2
  (NetBSD#32)[kazu-yamamoto/http2#32]
* Make sure connection preface is always sent first
  (NetBSD#33)[kazu-yamamoto/http2#33]
* Avoid empty data (NetBSD#34)[kazu-yamamoto/http2#34]

3.0.2
* Skip inserting entries that do not fit in the encoding table
  (NetBSD#28)[kazu-yamamoto/http2#28]
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this pull request May 14, 2026
3.0.3
* Return correct status messages in HTTP2 client
  (#31)[kazu-yamamoto/http2#31]
* Follow changes in Aeson 2
  (#32)[kazu-yamamoto/http2#32]
* Make sure connection preface is always sent first
  (#33)[kazu-yamamoto/http2#33]
* Avoid empty data (#34)[kazu-yamamoto/http2#34]

3.0.2
* Skip inserting entries that do not fit in the encoding table
  (#28)[kazu-yamamoto/http2#28]
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.

SETTINGS_HEADER_TABLE_SIZE not respected

2 participants