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

sendFile marks the response as compressed but does not compress the body #430

Closed
bclozel opened this issue Sep 14, 2018 · 3 comments
Closed
Labels
type/bug A general bug

Comments

@bclozel
Copy link
Member

bclozel commented Sep 14, 2018

This is a follow up issue for #340, the issue is only present on 0.7.x (it's apparently already fixed in the 0.8.x branch).

When writing static resources using sendFile and using an HTTP compression predicate, the HTTP response contains the gzip encoding header, but the actual response body is not compressed as it should be.

Steps to reproduce

The sample application listed here shows the problem.

It seems that the predicate is called twice: once during the sendFile call, and another time when flushing the HTTP headers. As mentioned here, it seems that 0.8.x removed the compression check in HttpServerOperations and everything works as expected.

@bclozel bclozel added the type/bug A general bug label Sep 14, 2018
@violetagg violetagg added this to the 0.7.x Maintenance Backlog milestone Sep 18, 2018
@smaldini smaldini modified the milestones: 0.7.x Maintenance Backlog, 0.7.10.RELEASE Sep 27, 2018
violetagg added a commit that referenced this issue Oct 5, 2018
@violetagg violetagg added status/invalid We don't feel this issue is valid and removed type/bug A general bug labels Oct 5, 2018
@violetagg violetagg removed this from the 0.7.10.RELEASE milestone Oct 5, 2018
@violetagg
Copy link
Member

violetagg commented Oct 5, 2018

I added test cases to cover this issue bcde045. I do not see an issue in Reactor Netty for the moment.
I suspect an issue in Spring Framework https://jira.spring.io/browse/SPR-17348.
Closing, you can reopen it later if it appears Reactor Netty issue.

violetagg added a commit that referenced this issue Oct 5, 2018
When NettyOutbound#sendFile, defer the decision for
DefaultFileRegion vs ChunkedInput
@violetagg violetagg added type/bug A general bug and removed status/invalid We don't feel this issue is valid labels Oct 5, 2018
@violetagg violetagg added this to the 0.7.10.RELEASE milestone Oct 5, 2018
@violetagg violetagg reopened this Oct 5, 2018
@violetagg
Copy link
Member

It is an issue in Reactor Netty - the decision for DefaultFileRegion vs ChunkedInput should be deferred.

@violetagg
Copy link
Member

Fixed with #451

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

No branches or pull requests

3 participants