Fix HTTP/2 session receive window handling for small sizes (#9117)#9122
Merged
zwoop merged 1 commit intoapache:9.2.xfrom Oct 5, 2022
Merged
Fix HTTP/2 session receive window handling for small sizes (#9117)#9122zwoop merged 1 commit intoapache:9.2.xfrom
zwoop merged 1 commit intoapache:9.2.xfrom
Conversation
This fixes the way we handle session window sizes if the user configures proxy.config.http2.initial_window_size_in to be smaller than the HTTP/2 protocol's default value of 65,535. For streams, we can communicate to the client a smaller stream size via a SETTINGS frame, but not so for smaller session window sizes. The way HTTP/2 hosts are expected to reduce their receive session window size is by receiving DATA frames without replying with WINDOW_UPDATE frames until the window falls to the desired value. ATS already handled this latter behavior correctly (letting the window size fall without sending WINDOW_UPDATE frames for the session until it reached the desired smaller value). However, it incorrectly reported an error and sent a GOAWAY frame when the user sent DATA content above the reduced window size before ATS gave the client a chance to reduce it via DATA frames. This fixes the receive session window check to allow for a shrinking session window. Fixes apache#9115 (cherry picked from commit 4fcb9b4) Conflicts: proxy/http2/Http2ConnectionState.cc
bneradt
approved these changes
Oct 5, 2022
Contributor
|
[approve ci autest] |
1 similar comment
Member
|
[approve ci autest] |
Contributor
|
Looks like the s3_auth test needs to be updated in 9.2.x: I can create a 9.2.x PR to fix that. Then hopefully the tests should work better. |
zwoop
approved these changes
Oct 5, 2022
masaori335
pushed a commit
to masaori335/trafficserver
that referenced
this pull request
Feb 21, 2023
…) (apache#9122) This fixes the way we handle session window sizes if the user configures proxy.config.http2.initial_window_size_in to be smaller than the HTTP/2 protocol's default value of 65,535. For streams, we can communicate to the client a smaller stream size via a SETTINGS frame, but not so for smaller session window sizes. The way HTTP/2 hosts are expected to reduce their receive session window size is by receiving DATA frames without replying with WINDOW_UPDATE frames until the window falls to the desired value. ATS already handled this latter behavior correctly (letting the window size fall without sending WINDOW_UPDATE frames for the session until it reached the desired smaller value). However, it incorrectly reported an error and sent a GOAWAY frame when the user sent DATA content above the reduced window size before ATS gave the client a chance to reduce it via DATA frames. This fixes the receive session window check to allow for a shrinking session window. Fixes apache#9115 (cherry picked from commit 4fcb9b4) Conflicts: proxy/http2/Http2ConnectionState.cc Co-authored-by: Brian Neradt <brian.neradt@gmail.com>
masaori335
pushed a commit
to masaori335/trafficserver
that referenced
this pull request
Feb 21, 2023
…pache#9117) (apache#9122)" This reverts commit a5f972f.
masaori335
pushed a commit
to masaori335/trafficserver
that referenced
this pull request
Feb 21, 2023
* asf/9.2.x: Updated ChangeLog Fail sni.yaml loading if related resources fail to load (apache#9132) fix contradicting documentation and say a bit about the resident size of a volume directory (apache#9133) AuTest automatic keylog file configuration (apache#9137) Traffic Dump: fix YAML format for CONNECT requests (apache#9139) Updated ChangeLog Remove intermediate buffer in PluginVC (apache#8698) Fix HTTP/2 session receive window handling for small sizes (apache#9117) (apache#9122) 9.2: Fix s3_auth_config test output check (apache#9123) Conflicts: CHANGELOG-9.2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Back porting #9117 to 9.2.x. I had to make
server_rwnd_is_shrinkingpublic member to resolve conflicts.This fixes the way we handle session window sizes if the user configures proxy.config.http2.initial_window_size_in to be smaller than the HTTP/2 protocol's default value of 65,535. For streams, we can communicate to the client a smaller stream size via a SETTINGS frame, but not so for smaller session window sizes. The way HTTP/2 hosts are expected to reduce their receive session window size is by receiving DATA frames without replying with WINDOW_UPDATE frames until the window falls to the desired value. ATS already handled this latter behavior correctly (letting the window size fall without sending WINDOW_UPDATE frames for the session until it reached the desired smaller value). However, it incorrectly reported an error and sent a GOAWAY frame when the user sent DATA content above the reduced window size before ATS gave the client a chance to reduce it via DATA frames. This fixes the receive session window check to allow for a shrinking session window.
Fixes #9115
(cherry picked from commit 4fcb9b4)
Conflicts:
proxy/http2/Http2ConnectionState.cc