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

Move HttpContentCompressorSubstitutions to quarkus-netty #23219

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

gastaldi
Copy link
Contributor

Fixes #23218

@gastaldi gastaldi requested a review from cescoffier January 26, 2022 19:42
@gastaldi gastaldi force-pushed the brotli_zstd branch 2 times, most recently from ec111b4 to 839121d Compare January 26, 2022 19:43
Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

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

Approved, but I want to be sure it fixes the reported issue.

@cescoffier
Copy link
Member

@gastaldi I made two minor comments.

@cescoffier cescoffier self-requested a review January 26, 2022 19:52
@cescoffier
Copy link
Member

Something is odd...
We already have:

@TargetClass(CompressorHttp2ConnectionEncoder.class)
    public static final class CompressorHttp2ConnectionSubstitute {

        @Substitute
        protected EmbeddedChannel newContentCompressor(ChannelHandlerContext ctx, CharSequence contentEncoding)
                throws Http2Exception {
            if (GZIP.contentEqualsIgnoreCase(contentEncoding) || X_GZIP.contentEqualsIgnoreCase(contentEncoding)) {
                return newCompressionChannel(ctx, ZlibWrapper.GZIP);
            }
            if (DEFLATE.contentEqualsIgnoreCase(contentEncoding) || X_DEFLATE.contentEqualsIgnoreCase(contentEncoding)) {
                return newCompressionChannel(ctx, ZlibWrapper.ZLIB);
            }
            // 'identity' or unsupported
            return null;
        }

        @Alias
        private EmbeddedChannel newCompressionChannel(final ChannelHandlerContext ctx, ZlibWrapper wrapper) {
            throw new UnsupportedOperationException();
        }
    }

@cescoffier
Copy link
Member

@gastaldi so, it's not the proper fix. We already have the included substitutions. They are in the quarkus-vertx-http (Runtime) module. I can't remember why there are there... However, we need to copy it to the netty runtime module.

@gastaldi
Copy link
Contributor Author

gastaldi commented Jan 26, 2022

Moved from vertx-http

@gastaldi gastaldi force-pushed the brotli_zstd branch 2 times, most recently from 1bb11ab to 92d8821 Compare January 26, 2022 20:22
@gastaldi gastaldi changed the title Remove Brotli and Zstd encoders in Netty Move HttpContentCompressorSubstitutions to quarkus-netty Jan 26, 2022
@gsmet
Copy link
Member

gsmet commented Jan 26, 2022

The commit message should be changed as it's pretty confusing now.

@gsmet
Copy link
Member

gsmet commented Jan 26, 2022

Ah perfect, you just did it :).

@gastaldi
Copy link
Contributor Author

The commit message should be changed as it's pretty confusing now.

yeap, good catch

@gastaldi gastaldi added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 26, 2022
@gastaldi gastaldi merged commit d8a8a77 into quarkusio:main Jan 27, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Jan 27, 2022
@gastaldi gastaldi deleted the brotli_zstd branch January 27, 2022 00:37
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 27, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.1.Final Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native compilation fails with unresolved type during parsing
3 participants