-
Notifications
You must be signed in to change notification settings - Fork 635
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 #292 refactor gzip compression handler #297
Conversation
Previously the logic was not updating the buffer pending bytes. Thus would prevent flush logic to operate correctly. Also A convoluted FilteringCompressor was used.
Add HttpServerResponse#compression to control per response compression.
We don't need to wrap non reactor types, and we need to leave callable source takes precedence
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
============================================
- Coverage 68.11% 66.92% -1.19%
+ Complexity 1030 1012 -18
============================================
Files 74 74
Lines 4318 4332 +14
Branches 615 615
============================================
- Hits 2941 2899 -42
- Misses 1006 1065 +59
+ Partials 371 368 -3
Continue to review full report at Codecov.
|
.subscriberContext(context); | ||
} | ||
|
||
static <T, V> Publisher<V> publiserOrScalarMap(Publisher<T> publisher, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in "publiser"...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed thanks
In this PR, we have tried to refactor CompressionHandler to correctly aggregate bytes until threshold. Unfortunately it is now put on hold as it still presents stability issues that we eventually will identify in a subsequent PR.
Now the PR introduces a new simple CompressionHandler that will compress without minimum threshold all traffic, HttpServers can choose to opt-in/opt-on the globally configured default on a per-response basis by using HttpServerResponse#compression(boolean).