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

fix: potential memory pressure on server side #372

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jrauschenbusch
Copy link
Contributor

@jrauschenbusch jrauschenbusch commented Feb 6, 2025

📝 Description

This fix changes the default configuration of the HTTP/2 transport to advertise an unlimited value to the peer for SETTINGS_MAX_HEADER_LIST_SIZE (0x6). This configuration basically disables sending the setting at all. So the server uses its default settings.

As some servers like Jetty allocate buffers in size of this setting, this can lead to memory pressure or even OOM errors when the server is not configured properly.

see https://www.ietf.org/archive/id/draft-ietf-httpbis-http2bis-07.html#section-6.5.2-2.11

🔗 Related Issues

#371

This fix changes the default configuration of the HTTP/2 transport to advertise an unlimited value to the peer for SETTINGS_MAX_HEADER_LIST_SIZE (0x6). This configuration basically disables sending the setting at all. So the server uses its default settings.

As some servers like Jetty allocate buffers in size of this setting, this can lead to memory pressure or even OOM errors when the server is not configured properly.

see https://www.ietf.org/archive/id/draft-ietf-httpbis-http2bis-07.html#section-6.5.2-2.11
@jrauschenbusch jrauschenbusch requested a review from a team as a code owner February 6, 2025 11:43
@jrauschenbusch
Copy link
Contributor Author

@nikos912000 Could you review my small changes? Additional tests for this configuration would require a different test server strategy to check the SETTINGS frame. So i avoided it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant