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

Provide API for adding pseudo headers to HPACKHeaders #254

Open
glbrntt opened this issue Oct 30, 2020 · 0 comments
Open

Provide API for adding pseudo headers to HPACKHeaders #254

glbrntt opened this issue Oct 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@glbrntt
Copy link
Contributor

glbrntt commented Oct 30, 2020

Pseudo headers must appear at the beginning of a block of headers. However, there's no API in HPACKHeaders to allow for this; it requires up-front knowledge that when constructed the pseudo headers are added first.

When a block of headers is provided (by a user, for example) which must then have pseudo headers added to it, a new block must be created, the pseudo headers added and then all of the headers from the provided block to be copied across. This incurs a potentially large unnecessary extra allocation.

HPACKHeaders is currently backed by an array, changing this to a CircularBuffer would allow cheap insertion to the front of the block via an add(pseudoHeader:value:) API.

@glbrntt glbrntt added the enhancement New feature or request label Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant