Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

pcapriotti
Copy link
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.
Copy link
Owner

@kazu-yamamoto kazu-yamamoto left a comment

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
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]
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