Add response compression and TLS endpoint support#9
Merged
Conversation
A `Compression` concern (gzip via java.util.zip) that negotiates Accept-Encoding and, for compressible content types above a size threshold, replaces the response body with a compressed variant and sets Vary: Accept-Encoding. Mirrors GenHTTP's Modules/Compression. Lives under Modules/IO (compression/) with a `Compression` entry point; enable it on a host via `.add(Compression.default())`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds HTTPS endpoints: a SecurityConfiguration (PEM certificate chain + PKCS#8 key) on EndPointConfiguration, a secure bind(address, port, certificate, key) overload on the server builder/host, and an SslHandler prepended to the Netty pipeline (built via SslContextBuilder) so an endpoint terminates TLS and serves HTTP/1.1 over it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MDA2AV
added a commit
to MDA2AV/HttpArena
that referenced
this pull request
Jun 4, 2026
* fishcake: add static, json-comp and json-tls profiles Adds the three remaining isolated HTTP/1.1 profiles to the CodeGreen entry: - static: serves /data/static with pre-compressed variant selection (serves the on-disk .br/.gz sibling with the original file's Content-Type when the client accepts it, else the raw file; 404 for a missing file). Implemented in the entry (StaticFiles.kt) on CodeGreen's IO primitives. - json-comp: enables the gzip compression concern on the host (.add(Compression.default())) so /json responses carry Content-Encoding: gzip only when Accept-Encoding is sent. - json-tls: binds HTTPS on :8081 with the harness certificate (/certs), serving HTTP/1.1 over TLS. json-comp and json-tls rely on the response-compression module + TLS engine support added in CodeGreen PR dotnet-web-stack/CodeGreen#9; the Dockerfile temporarily clones that branch (add-compression-tls) until it merges to stream-bodies. ./scripts/validate.sh fishcake passes 41/0 (12 profiles). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fishcake: clone CodeGreen from main (compression/TLS/pipelining merged) CodeGreen PRs #9 (response compression + TLS + pipelined flush coalescing) and #10 (request-body streaming) are merged to main, so the build no longer needs the temporary add-compression-tls branch. Clone main, which carries everything these profiles use. Validated via the real (clone-from-main) Docker build: ./scripts/validate.sh fishcake = 41/0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Benchmark results: fishcake --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two engine/module additions, ports of the corresponding GenHTTP features. They unblock the
json-compandjson-tlsHttpArena profiles for the fishcake entry.Response compression (
Modules/IO)A
Compressionconcern (gzip viajava.util.zip) that negotiatesAccept-Encodingand, for compressible content types above a size threshold, replaces the response body with a compressed variant and setsVary: Accept-Encoding. No third-party dependency. Enable on a host with.add(Compression.default()). Mirrors GenHTTP'sModules/Compression.compression/AcceptEncoding,GzipAlgorithm,CompressedContent,CompressionConcern,CompressionConcernBuilder, +Compressionentry point.TLS endpoints (engine)
HTTPS support in the Netty engine:
SecurityConfiguration(PEM certificate chain + PKCS#8 key) onEndPointConfiguration.bind(address, port, certificate, key)overload on the server builder + host.InternalEndPointbuilds anSslContext(NettySslContextBuilder) and prepends anSslHandlerso the endpoint terminates TLS and serves HTTP/1.1 over it.Validation
Exercised end-to-end via the fishcake entry against
./scripts/validate.sh fishcake(compression:Content-Encoding: gziponly withAccept-Encoding; TLS: HTTP/1.1 over TLS servingapplication/json). All profiles green.🤖 Generated with Claude Code