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

Ensure HttpServer minCompressionSize is respected when Content-Length is not explicit and response is Mono #2646

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

violetagg
Copy link
Member

When a Mono is sent as a response or a single ByteBuf is sent as a response, Reactor Netty will send FullHttpResponse and thus is able to set Content-Length if such is not already set. Based on the Content-Length, Reactor Netty can decide whether or not a compression is needed.

… is not explicit and response is Mono

When a Mono is sent as a response or a single ByteBuf is sent as a response,
Reactor Netty will send FullHttpResponse and thus is able to set Content-Length if such is not already set.
Based on the Content-Length, Reactor Netty can decide whether or not a compression is needed.
@violetagg violetagg added the type/bug A general bug label Jan 11, 2023
@violetagg violetagg added this to the 1.0.28 milestone Jan 11, 2023
@violetagg violetagg requested a review from a team January 11, 2023 08:54
@violetagg
Copy link
Member Author

@reactor/netty-team PTAL

Copy link
Contributor

@pderop pderop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I see ... it is the newFullBodyMessage which is setting the Content-Length header, so the newFullBodyMessage method must be called prior to afterMarkSentHeaders() call.

LGTM

@violetagg
Copy link
Member Author

@pderop Thanks for the review!

@violetagg violetagg merged commit 1b61318 into 1.0.x Jan 11, 2023
@violetagg violetagg deleted the compression-below-specified-size branch January 11, 2023 09:44
violetagg added a commit that referenced this pull request Jan 11, 2023
violetagg added a commit that referenced this pull request Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants