Fix HTTP/2 session receive window handling for small sizes#9117
Merged
bneradt merged 1 commit intoapache:masterfrom Oct 4, 2022
Merged
Fix HTTP/2 session receive window handling for small sizes#9117bneradt merged 1 commit intoapache:masterfrom
bneradt merged 1 commit intoapache:masterfrom
Conversation
maskit
reviewed
Oct 3, 2022
fc16ae8 to
deebda6
Compare
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
deebda6 to
a99d18e
Compare
maskit
approved these changes
Oct 3, 2022
Member
|
We should probably back port this to 9.2.x. |
Contributor
|
@masaori335 @maskit This has some merge conflicts, possibly with something else you may have fixed which didn't go into 9.2.x? Can you take a look please? |
maskit
pushed a commit
to maskit/trafficserver
that referenced
this pull request
Oct 5, 2022
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
zwoop
pushed a commit
that referenced
this pull request
Oct 5, 2022
…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 #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
…) (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
JosiahWI
pushed a commit
to JosiahWI/trafficserver
that referenced
this pull request
Jul 19, 2023
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)
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.
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