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

feat(http1): support configurable max_headers #3523

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

yukiiiteru
Copy link
Contributor

Recently we encountered a problem when using hyper.

After the client sent the request, it received response 431 Request Header Fields Too Large. After investigation, we found that hyper sets an upper limit on the number of headers, and this upper limit is a fixed and non-configurable value.

#3283 also encountered similar problems.

This PR sets max_headers to a configurable value. Its default value remains the same as the previous code, and we can set this value when needed.

Additionally, unit tests have been added and the current code passes.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Thanks for the thorough PR! I welcome adding the option, but I want to make sure we continue to stay as fast as possible.

src/proto/h1/role.rs Outdated Show resolved Hide resolved
@aviramha
Copy link

We encountered an issue that requires this as well, thanks for sending PR! would love to help if needed :)

Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Phenomenal work!

@seanmonstar seanmonstar merged commit b114244 into hyperium:master Jan 25, 2024
21 checks passed
@yukiiiteru yukiiiteru deleted the dyn-header-size branch January 26, 2024 09:46
yukiiiteru added a commit to yukiiiteru/hyper-util that referenced this pull request Mar 11, 2024
Adapts configurable `max_headers` from hyperium/hyper#3523.
yukiiiteru added a commit to yukiiiteru/hyper-util that referenced this pull request Mar 11, 2024
Adapts configurable `max_headers` by hyperium/hyper#3523.
IvanGoncharov pushed a commit to apollographql/hyper that referenced this pull request Oct 23, 2024
IvanGoncharov added a commit to apollographql/hyper that referenced this pull request Oct 23, 2024
IvanGoncharov pushed a commit to apollographql/hyper that referenced this pull request Oct 23, 2024
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.

5 participants