-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/6.0] Fix compression #79549
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBackport of #79412 to release/6.0 /cc @CarnaViire @greenEkatherine Customer ImpactTestingRiskIMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Miha Zupan <[email protected]>
CI failures are unrelated. runtime:
runtime-staging: |
src/libraries/System.Net.WebSockets.Client/ref/System.Net.WebSockets.Client.cs
Outdated
Show resolved
Hide resolved
Approved by @SteveMCarroll via email on 2023/1/5 7:44am - adding Servicing-approved label.
|
Approved by Tactics (6.0.14). |
Backport of #79412 to release/6.0
Fixes #77783
/cc @CarnaViire @greenEkatherine
Customer Impact
In .NET 6 we implemented WebSocket compression. It can be configured on per-connection and per-message basis. The per-message configuration is done via WebSocketMessageFlags, which are honored in WebSocket class (used mainly for server-side WebSockets), but are not exposed properly in ClientWebSocket class (used for client-side WebSockets).
The fix unifies behavior of ClientWebSocket with WebSocket. The fix does it by delegating to the encapsulated WebSocket instance (which already works correctly), instead of falling back to parent class implementation.
Regression?
No. The old behavior existed since introducing the feature in .NET 6.
Testing
CI + targeted test case.
Risk
Low risk - the change unifies behavior of ClientWebSocket with WebSocket. It does not add new code or behavior.
Also note that WebSocket compression is disabled by default.