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

WebSocket Compression #49304

Merged
merged 47 commits into from
Apr 28, 2021
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
705c171
Prototyped how deflate/inflate should be plugged in.
zlatanov Mar 4, 2021
740798c
Replaced WebSocketReceiveResultGetter abstraction for the receive wit…
zlatanov Mar 4, 2021
72a34fd
Moved ZLibNative and ZLibNative.ZStream to Common so they can be used…
zlatanov Mar 4, 2021
5128c9f
Added compression related implementation.
zlatanov Mar 4, 2021
2825973
Added api changes and implementation to ClientWebSocket to light up d…
zlatanov Mar 5, 2021
67a5d72
Added tests and fixed a few deflate bugs.
zlatanov Mar 5, 2021
9cb024e
Forgot to dispose inflater & deflater.
zlatanov Mar 6, 2021
92cf8f4
Addressing pr feedback.
zlatanov Mar 9, 2021
4045305
Moved deflate state into deflater.
zlatanov Mar 9, 2021
862e163
Moved inflater buffer into the inflater.
zlatanov Mar 9, 2021
92520b6
Using Math.Clamp instead of Math.Min/Max.
zlatanov Mar 14, 2021
4d024fa
Releasing deflater buffer as soon as we're done using it.
zlatanov Mar 14, 2021
b8bdfae
Using 2 constructors in ManagedWebSocket to avoid allocations for Web…
zlatanov Mar 14, 2021
7e8d3c4
Added missing assert.
zlatanov Mar 14, 2021
3869367
Removed unnecessary comments that visual studio inserted from resx fi…
zlatanov Mar 14, 2021
b7f58b1
Better buffer handling in inflater.
zlatanov Mar 15, 2021
c6c3326
Renaming clientBufferLength to userBufferLength.
zlatanov Mar 15, 2021
7ec3151
Fixed an issue in inflater / deflater where with context takeover, th…
zlatanov Mar 26, 2021
271c9cd
Revert removal of BOM.
zlatanov Mar 26, 2021
61c7e5b
PR feedback for ClientWebSocket.
zlatanov Mar 26, 2021
4fa65f4
PR feedback for WebSocket.
zlatanov Mar 26, 2021
9031be3
Prefer Length over IsEmpty for spans.
zlatanov Mar 26, 2021
4e70073
Fixed wrong check.
zlatanov Mar 29, 2021
b7743ef
New API that allows disabling compression per message basis and renam…
zlatanov Mar 31, 2021
49d00eb
Added comment explaining why GetReceiveResult<TResult> will not resul…
zlatanov Mar 31, 2021
58a3338
Exposed DeflateReset and InflateReset methods from zlib.
zlatanov Mar 31, 2021
56fd0ef
Pooling zlib streams.
zlatanov Mar 31, 2021
fdf41d6
Moved min/max deflate window bits consants to WebSocketValidate so th…
zlatanov Apr 8, 2021
4fd18f6
Testing negotiation of deflate options with reflection.
zlatanov Apr 8, 2021
29c539a
Removed the default value for messageFlags parameter.
zlatanov Apr 8, 2021
0739640
pr feedback
zlatanov Apr 8, 2021
224f7ab
Removed cache capacity limit for deflate streams. Now the cache is on…
zlatanov Apr 8, 2021
4a7feb4
Created a test with active issue to track a failing case for the defl…
zlatanov Apr 8, 2021
222c782
Disabled client websocket deflate tests for browser platform.
zlatanov Apr 9, 2021
0b09b5b
Created tests for ZLibStream pooling.
zlatanov Apr 12, 2021
99869bf
Reusing constants in deflate options.
zlatanov Apr 14, 2021
c46a0f3
Fixing tests for browser environment.
zlatanov Apr 14, 2021
3ec748d
Added Block flush code for zlib, because it's needed for websockets.
zlatanov Apr 16, 2021
fb45f2c
Bug fixes after running Autobahn WebSocket Testsuite.
zlatanov Apr 16, 2021
00283e8
Addressing PR feedback.
zlatanov Apr 16, 2021
5a0e435
Fixed a test.
zlatanov Apr 16, 2021
935969a
Addressing flakiness of a couple of tests.
zlatanov Apr 19, 2021
437b7e7
Disallowing the usage of different compression options for continuati…
zlatanov Apr 20, 2021
5edadd9
Removed [ActiveIssue] from websocket deflate tests. Created a new tes…
zlatanov Apr 24, 2021
f6a4b32
Addressing PR feedback.
zlatanov Apr 28, 2021
f0f09f3
Removed custom deflate pool.
zlatanov Apr 28, 2021
ea049ea
Added missing dispose when creating deflater.
zlatanov Apr 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed a test.
zlatanov committed Apr 26, 2021
commit 5a0e4358dc01bd73bc720c362d150dc10eeae062
Original file line number Diff line number Diff line change
@@ -22,12 +22,12 @@ public DeflateTests(ITestOutputHelper output) : base(output)

[ConditionalTheory(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
[InlineData(15, true, 15, true, "permessage-deflate; client_max_window_bits; server_max_window_bits")]
[InlineData(14, true, 15, true, "permessage-deflate; client_max_window_bits=14; server_max_window_bits")]
[InlineData(15, true, 15, true, "permessage-deflate; client_max_window_bits")]
[InlineData(14, true, 15, true, "permessage-deflate; client_max_window_bits=14")]
[InlineData(15, true, 14, true, "permessage-deflate; client_max_window_bits; server_max_window_bits=14")]
[InlineData(10, true, 11, true, "permessage-deflate; client_max_window_bits=10; server_max_window_bits=11")]
[InlineData(15, false, 15, true, "permessage-deflate; client_max_window_bits; client_no_context_takeover; server_max_window_bits")]
[InlineData(15, true, 15, false, "permessage-deflate; client_max_window_bits; server_max_window_bits; server_no_context_takeover")]
[InlineData(15, false, 15, true, "permessage-deflate; client_max_window_bits; client_no_context_takeover")]
[InlineData(15, true, 15, false, "permessage-deflate; client_max_window_bits; server_no_context_takeover")]
public async Task PerMessageDeflateHeaders(int clientWindowBits, bool clientContextTakeover,
int serverWindowBits, bool serverContextTakover,
string expected)