Skip to content
CAI
Software that uses CAICheck a score

http4s/blaze

51.0

Weak · 6 November 2026

18k

lines of production code

Scala

with Java

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Blaze NIO1 echo server example and SSL keystore utilities

The examples directory now includes a new EchoServer demonstrating how to start a basic TCP echo service using the NIO1SocketServerGroup, along with ExampleKeystore providing helper methods to configure SSL contexts for both standard server-side TLS and mutual client-certificate authentication.

examples/src/main/scala/org/http4s/blaze · high confidence

Add connection monitoring capabilities to the pipeline

A new \ConnectionMonitor\ abstraction and its \BasicConnectionMonitor\ implementation have been added to the Blaze pipeline stages. This allows users to track basic connection metrics, including the number of live connections, inbound bytes, and outbound bytes, by injecting a monitoring stage into the server pipeline.

core/src/main/scala/org/http4s/blaze/pipeline/stages/monitors · high confidence

Added HTTP client demo examples for multipart and streaming

New demo files have been added to the http4s blaze client examples directory: MultipartClient.scala demonstrates how to construct and send multipart form requests (including file uploads) using BlazeClientBuilder, and StreamClient.scala shows how to stream HTTP responses and decode them as text using fs2 streams.

examples/src/main/scala/com/example/http4s/blaze/demo/client · high confidence

Added HTTP utility helpers for header handling, URL parsing, and disconnect management

This change introduces a new set of utility classes in the \org.http4s.blaze.http.util\ package to support HTTP server operations. \HeaderTools\ provides logic for rendering HTTP headers, specifically handling special headers like Transfer-Encoding, Content-Length, and Connection, and automatically appending a Date header if one is missing. \HeaderLike\ defines a trait for generic header operations with an implicit implementation for tuple-based headers. \UrlTools\ offers a \UrlComposition\ case class to parse URLs, extract components like scheme and path, and resolve default ports. Additionally, \NormalDisconnect\ provides a helper to identify expected disconnection errors such as EOF and timeouts.

http/src/main/scala/org/http4s/blaze/http/util · high confidence

Added local HTTP benchmarking scripts

Added a new shell script (scripts/dowrklocal) and a Lua script (scripts/pipeline.lua) to facilitate local HTTP performance testing using the wrk tool. The pipeline.lua script configures wrk to send pipelined requests to the /plaintext endpoint, allowing users to easily benchmark the server's throughput and latency locally.

scripts · high confidence

Configurable logging for examples via Logback

The examples module now includes dedicated Logback configuration files (logback.xml and logback-test.xml) that enable console logging with a detailed timestamp, thread, and level pattern. The production configuration defaults to INFO level, while the test configuration allows the root log level to be overridden via the LOGBACK\_ROOT\_LEVEL environment variable, giving users control over log verbosity in different environments.

examples/src/main/resources · high confidence

Initial project scaffolding and configuration

This change establishes the foundational structure for the Blaze project by adding essential configuration files, including Nix flake definitions for the development environment, Scalafmt and Scalafix settings for code formatting and linting, and a Mergify configuration for automated pull request labeling. It also introduces the Apache 2.0 license, a Code of Conduct, and a comprehensive README documenting the project's modules, features, and usage.

(repo-wide) · high confidence

Introduce NIO2-based asynchronous channel implementation

Added a new NIO2 channel implementation for the Blaze HTTP client, introducing \ClientChannelFactory\ to manage TCP connections with configurable connect timeouts and channel options, \ByteBufferHead\ to handle asynchronous read/write operations via Java NIO2, and supporting constants in the package object. This provides an alternative asynchronous I/O backend for http4s clients.

core/src/main/scala/org/http4s/blaze/channel/nio2 · high confidence

Introduce new Blaze HTTP model types and streaming body support

This change introduces the core data models for the Blaze HTTP implementation, including \HttpRequest\, \ClientResponse\, and a new \BodyReader\ trait that enables streaming body consumption with overflow protection. It also adds \HeaderNames\ for HTTP/2 compatible header validation, \ALPNTokens\ for protocol identification, and a \logsensitiveinfo\ property to control whether sensitive header data is included in \toString\ outputs for security.

http/src/main/scala/org/http4s/blaze/http · high confidence

Introduce new HTTP/1.1 client and core networking infrastructure

This change introduces the foundational components for the HTTP/1.1 client and underlying networking layers. It adds \Http1Connection\ to handle HTTP/1.1 request/response parsing and connection state, along with a \PoolManager\ for managing connection pooling, idle timeouts, and wait queues. The update also brings in core networking utilities including \IdleTimeoutStage\ for monitoring connection inactivity, \NIO1HeadStage\ for NIO-based channel I/O, \SSLStage\ for TLS handling, and \ServerChannel\ for server-side socket management. Additionally, it provides \ChannelOptions\ for configuring socket options and \IntervalConnectionMonitor\ for tracking connection metrics.

repository · high confidence

Introduce new pipeline stage components for http4s-blaze

This change adds several new core pipeline stages to the \org.http4s.blaze.pipeline.stages\ package. It introduces \BasicTail\ as a simple tail stage implementation, \ByteToObjectStage\ as a reusable mid-stage for encoding/decoding byte buffers to objects with buffer overflow protection, and \OneMessageStage\ for handling single-element message flows. Additionally, it adds \TimeoutStageBase\ as an abstract base for timeout logic using \TickWheelExecutor\ and \Cancelable\, and \QuietTimeoutStage\ which extends this base to shut down the pipeline after a period of inactivity.

core/src/main/scala/org/http4s/blaze/pipeline/stages · high confidence

Introduction of internal utility infrastructure for the Blaze HTTP engine

This change adds a suite of internal utility components to the \org.http4s.blaze.util\ package that support the underlying HTTP server and client implementations. Key additions include a lightweight, thread-local \Actor\ model for message passing, a \SerialExecutionContext\ to serialize task execution, and specialized \ExecutionContext\ implementations such as a trampolining executor and a direct executor. The package also introduces \BufferTools\ for efficient \ByteBuffer\ manipulation, a \ReadPool\ for managing inbound data queues, and a \ThreadLocalScratchBuffer\ for thread-local buffer caching. Additionally, it provides \BasicThreadFactory\ for thread creation, \GenericSSLContext\ for SSL configuration (including a bogus keystore for testing), and \StageTools\ for accumulating bytes from pipeline stages.

core/src/main/scala/org/http4s/blaze/util · high confidence

New Blaze HTTP server and client examples

Added a suite of example applications under the com.example.http4s.blaze namespace demonstrating how to use the Blaze server and client implementations. These include basic HTTP server setup (BlazeExample), SSL/TLS support with optional HTTP-to-HTTPS redirection (BlazeSslExample, BlazeSslExampleWithRedirect), WebSocket handling with echo and ping/pong patterns (BlazeWebSocketExample), and various client-side patterns such as simple GET/POST requests, JSON decoding with status code matching (ClientExample), and multipart form uploads (ClientMultipartPostExample). A shared StreamUtils helper is also provided for the demo components.

examples/src/main/scala/com/example/http4s/blaze · high confidence

New HTTP4s example service with authentication and streaming

Added ExampleService and SSL configuration to the examples module, demonstrating core HTTP4s capabilities including route mounting, streaming responses, multipart form handling, and Basic Authentication. The service exposes endpoints for health checks, static file serving, and content transformation, while the SSL component provides utilities for loading keystores and redirecting HTTP traffic to HTTPS.

examples/src/main/scala/com/example/http4s · high confidence

New http4s Blaze demo server with multiple endpoints

Added a new demo server application in the examples directory that serves as a comprehensive showcase for the http4s Blaze server. The server exposes several endpoints including file directory listing, hex-encoded name responses, multipart file uploads, and a simulated timeout. It also implements authentication features such as Basic Auth and a GitHub OAuth2 flow, along with middleware for GZip compression, automatic slash redirection, and request timeouts.

examples/src/main/scala/com/example/http4s/blaze/demo/server · high confidence

Nix package definition for SBT with configurable Java runtime

A new Nix package definition (nix/pkgs.nix) has been added to manage build dependencies. This file pins the Nixpkgs repository to a specific version using a JSON configuration file and defines a custom SBT package that allows users to specify which Java runtime (JRE) should be used for the build tool.

nix · high confidence

Removals

Removal of Grizzly and Netty example applications

The standalone example applications for the Grizzly and Netty server integrations have been removed from the codebase. Users can no longer run the \Example.scala\ files in the \examples/src/main/scala/org/http4s/examples/grizzly\ and \examples/src/main/scala/org/http4s/examples/netty\ directories to launch these specific server implementations.

examples/src/main/scala/org/http4s/examples/grizzly · high confidence

Removal of Jetty Servlet example

The example demonstrating how to run http4s within a Jetty servlet container has been removed. Users can no longer use this specific file to deploy http4s applications via the legacy javax.servlet API and Jetty.

examples/src/main/scala/org/http4s/examples/servlet · high confidence

Removal of legacy ExampleRoute implementation

The \ExampleRoute.scala\ file, which contained a collection of example HTTP routes (such as ping, echo, and challenge endpoints) built on the older Play Iteratee-based API, has been removed from the examples directory. This deletion reflects a shift away from the previous routing and body-handling patterns in favor of newer abstractions.

examples/src/main/scala/org/http4s/examples · high confidence

Behavioural changes

1 commit (0 fixes) modifying examples/src/main/resources/clientauth

A change to existing behaviour in examples/src/main/resources/clientauth — 1 commit, 5 files: “Add example of SSL client authentication”.

examples/src/main/resources/clientauth · medium confidence · unverified

Add Scala 2.13 compatibility shim for collection conversions

Users running http4s on Scala 2.13 can now utilize the blaze HTTP client without compilation errors. A new compatibility object in the blaze internal package provides a bridge to \scala.jdk.CollectionConverters\, ensuring that internal code relying on Java collection interoperability works correctly on the newer Scala version.

core/src/main/scala-2.13 · high confidence

Added Scala 2.11/2.12 compatibility shim for Java collection conversions

A new compatibility object has been added to the core Blaze HTTP client module to provide a unified access point for Java collection conversions. This shim, located in the internal package, exposes the \scala.collection.JavaConverters\ object, ensuring that code relying on these conversions behaves consistently across Scala 2.11 and 2.12 versions.

core/src/main/scala-2.11-2.12 · high confidence

Blaze channel connection defaults and error handling improvements

The Blaze channel layer now sets the default maximum number of active connections to 512 and configures the default thread pool size based on the number of available CPU cores (minimum 4). Additionally, connection error handling has been refined to explicitly recognize and normalize specific 'broken pipe' and 'connection reset' messages from various operating systems and Java versions as standard EOF conditions, ensuring more consistent disconnect behavior for users.

core/src/main/scala/org/http4s/blaze/channel · high confidence

Blaze client refactored with new connection pooling and idle duration controls

The Blaze HTTP client implementation has been restructured to improve connection management and resource handling. A new \ConnectionManager\ abstraction (including \BasicManager\ and \PoolManager\) now handles connection lifecycle, replacing previous inline pooling logic. Users can now configure \maxIdleDuration\ via \BlazeClientBuilder\ to mitigate stale connections that may be closed while idling in the pool. The client also introduces a \BlazeClientState\ trait for monitoring pool metrics such as allocated connections and queue depths. Additionally, the builder has been updated to deprecate the \executionContext\ parameter in favor of \executionContextConfig\, and the retry logic for \SocketException\ is now explicitly configurable via a \retries\ parameter.

blaze-client/src/main/scala/org/http4s/blaze · high confidence

Blaze server refactoring and HTTP/1.1 compliance hardening

The Blaze server implementation has been restructured into a new package (org.http4s.blaze.server) and refactored to improve HTTP/1.1 RFC 9112 compliance and security. The HTTP parser now strictly rejects malformed requests, including those with both Transfer-Encoding and Content-Length headers, duplicate Content-Length headers, and obsolete line folding (obs-fold). WebSocket message sizes are now capped by default (4 MiB) to prevent resource exhaustion, with the limit configurable via BlazeServerBuilder. Additionally, the HTTP/2 implementation is deprecated, and the server builder API has been simplified by removing the deprecated withSSL/withSSLContext methods in favor of withSslContext and consolidating execution context configuration.

blaze-server/src/main/scala/org/http4s/blaze · high confidence

Deprecate HTTP/2 server implementation

The HTTP/2 server components, specifically the ALPN negotiation handler (ALPNServerSelector) and the prior-knowledge handshaker (ServerPriorKnowledgeHandshaker), are now deprecated and will be removed in a future version. Users relying on the built-in HTTP/2 server support should be aware that this functionality is unmaintained.

http/src/main/scala/org/http4s/blaze/http/http2/server · high confidence

Deprecate legacy BlazeClientBuilder aliases

The \BlazeClientBuilder\ type alias and companion object in the \org.http4s.client.blaze\ package are now deprecated as of version 0.22. Users should migrate to \org.http4s.blaze.client.BlazeClientBuilder\ to ensure compatibility with future releases.

blaze-client/src/main/scala/org/http4s/client · high confidence

Deprecated aliases added for legacy Blaze server builder

The \org.http4s.server.blaze\ package now includes deprecated type and value aliases for \BlazeServerBuilder\ that point to the new \org.http4s.blaze.server.BlazeServerBuilder\. These aliases are marked for removal in version 0.22, signaling to users that they should migrate their imports and usage to the new package location.

blaze-server/src/main/scala/org/http4s/server · high confidence

HTTP/2 implementation marked as deprecated

The HTTP/2 implementation in the \blaze\ module is now deprecated and will be removed in a future version (0.23.18). All core components in this area—including \ConnectionImpl\, \FrameDecoder\, \FrameEncoder\, \PriorKnowledgeHandshaker\, and related stream and header handling classes—have been annotated with a deprecation notice indicating that HTTP/2 support is unmaintained.

http/src/main/scala/org/http4s/blaze/http/http2 · high confidence

New Java HTTP/1.1 parser implementation

The HTTP/1.1 parser has been rewritten in Java (replacing the previous Scala implementation) within the \org.http4s.blaze.http.parser\ package. This change introduces a new set of parser classes (\Http1ServerParser\, \Http1ClientParser\, \BodyAndHeaderParser\) that handle request and response line parsing, header validation, and chunked transfer encoding. The new parser enforces stricter validation, such as requiring valid tchar characters in header names and ensuring header values are present, and includes a fix for a chunked transfer-encoding bug. Users will experience a native Java parsing layer with updated error handling via \BaseExceptions\.

http/src/main/java · high confidence

New WebSocket implementation with Ping/Pong support and message size limits

The Blaze WebSocket stage has been replaced with a new implementation that introduces a dedicated \Http4sWSStage\ to handle the WebSocket lifecycle. This change adds support for receiving Ping messages from clients (and automatically replying with Pongs) and allows applications to handle Pong messages, which were previously ignored. It also enforces a cap on aggregate WebSocket message sizes, closing the connection with a 1009 status code if the limit is exceeded, and improves protocol compliance by properly handling reserved and unknown opcodes.

blaze-core/src/main/scala/org/http4s/blazecore/websocket · high confidence

New pipeline builder API with LeafBuilder and TrunkBuilder

The pipeline construction API has been refactored to use explicit builder types. Users now build pipelines using \LeafBuilder\ (starting from a Tail) and \TrunkBuilder\ (starting from a MidStage), which provide methods like \prepend\, \append\, \base\, and \cap\ to assemble stages. This replaces the previous implicit or less structured stage linking mechanism, enforcing that stages are fresh (not already part of a pipeline) when added and providing clearer separation between head, mid, and tail stages.

core/src/main/scala/org/http4s/blaze/pipeline · high confidence

Refactor HTTP/1.1 connection handling and add response header timeout

The Blaze HTTP/1.1 implementation now strictly follows RFC 9112 for connection persistence, updating the logic in Http1Stage to correctly interpret Connection headers and manage keep-alive behavior. A new ResponseHeaderTimeoutStage has been introduced to enforce timeouts on incoming response headers, configurable via the builder. Additionally, the BlazeBackendBuilder trait now exposes methods to configure standard socket options (such as SO\_KEEPALIVE, TCP\_NODELAY, and buffer sizes) directly through the builder API.

blaze-core/src/main/scala/org/http4s/blazecore · high confidence

Refactor parasitic execution context compatibility layer

The internal compatibility layer for obtaining a parasitic execution context has been renamed from XCompat to ParasiticExecutionContextCompat. This change updates the implementation in the Scala 2.12 and Scala 3 specific source directories to use the new trait name, ensuring consistent internal naming for the utility that provides a trampolined or parasitic execution context depending on the Scala version.

blaze-core/src/main/scala-2.12, blaze-core/src/main/scala-3 · high confidence

Refactored HTTP/1.1 and HTTP/2 response writing utilities

The \blaze-core/src/main/scala/org/http4s/blazecore/util\ package has been restructured to improve the handling of HTTP response bodies. New writer implementations have been introduced, including \BodylessWriter\ for discarding entity bodies, \CachingChunkWriter\ for buffering and optimizing chunked responses, \FlushingChunkWriter\ for immediate flushing, and \IdentityWriter\ for strict content-length enforcement. The \Http1Writer\ trait now coordinates header and body writing with better error handling via \guaranteeCase\, while \Http2Writer\ has been deprecated as HTTP/2 support is unmaintained. Utility objects like \ChunkWriter\ and \EntityBodyWriter\ provide shared logic for encoding chunks and managing stream compilation, and a new \fromFutureNoShift\ helper optimizes internal future handling by avoiding unnecessary execution context shifts.

blaze-core/src/main/scala/org/http4s/blazecore/util · high confidence

Refactored NIO1 channel implementation with dedicated acceptor and worker thread pools

The NIO1 networking layer has been restructured to separate acceptor and worker responsibilities into distinct thread pools. A new \FixedSelectorPool\ manages round-robin distribution of \SelectorLoop\ instances, while \NIO1SocketServerGroup\ now accepts these pools to configure server behavior. This change introduces a dedicated acceptor pool (defaulting to a single thread) for handling incoming connections and a configurable worker pool for processing I/O events, improving resource isolation and allowing users to tune thread counts and buffer sizes independently.

core/src/main/scala/org/http4s/blaze/channel/nio1 · high confidence

Use parasitic ExecutionContext for Scala 2.13

The Blaze HTTP client now utilizes Scala 2.13's native \ExecutionContext.parasitic\ for internal execution contexts. This change, implemented via a new compatibility trait in the Scala 2.13-specific source directory, replaces previous workarounds to leverage the standard library's optimized, non-forking execution context, improving performance and reducing overhead for fire-and-forget tasks.

blaze-core/src/main/scala-2.13 · high confidence

Test coverage

1 commit adding/updating tests in blaze-server/src/test/resources; Added HTTP/2 mock utilities for testing; Added MUnit-based test suites for blaze-core utilities; Added MUnit-based tests for blaze channel options and lifecycle; Added Scala 2.13-specific Blaze client test suite; Added comprehensive test suite for HTTP/2 implementation; Added comprehensive test suites for the Blaze HTTP client; Added test for ClientChannelFactory timeout behavior; Added test infrastructure and utilities for Blaze core; Added test suite for blaze pipeline stages; Added test suites and benchmarks for HTTP parsers; Added test suites for BodyReader and HeaderNames validation; Added test utilities and specs for HTTP/1 writer implementations; Added tests for Blaze server mTLS support and HTTP/1.1 connection handling; Added unit tests for WebSocket handshake and stage behavior; New BlazeTestSuite base class for HTTP4s Blaze tests.

Dependencies

Modernized build configuration with updated dependencies and plugins

The project build has been modernized by migrating to the \\*.sbt\ plugin format and upgrading the build tool to sbt 1.13.0. This change introduces a centralized \Dependencies.scala\ file that defines specific versions for core libraries, including async-http-client 3.0.14, logback-classic 1.2.13, log4s 1.10.0, and MUnit 1.0.0-M6. Additionally, the build now incorporates sbt-buildinfo 0.13.2, sbt-java-formatter 0.8.0, sbt-revolver 0.10.0, and the sbt-http4s-org 2.0.7 plugin to streamline development and release workflows.

project · high confidence

Update build dependencies to Scala 2.13.18, Scala 3.3.8, and http4s 0.23.38

The build configuration has been updated to use Scala 2.13.18 and 2.12.21, along with Scala 3.3.8, while http4s dependencies (including http4s-core, http4s-server, and http4s-dsl) are bumped to version 0.23.38. The munit-cats-effect test library is updated to 2.2.1, and the project now targets Java 8 exclusively. Additionally, MiMa binary compatibility filters have been adjusted to exclude specific private method changes in the blaze-core module for Scala 3.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 57 → 51 (-6.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 72 → 72 (+0.0)
  • Architecture 79 → 79 (+0.0)
  • Maturity 50 → 50 (-0.0)
  • Readiness 54 → 42 (-11.8)
  • Security 64 → 54 (-10.1)
  • Performance 100 → 100 (+0.0)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (2)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 6 commits — 6 feature/other, 0 fixes

By area

  • (repo) — 3 commits
  • (root) — 2 commits
  • project/build.properties — 1 commit

Notable commits

  • change: Merge pull request #1085 from http4s/update/series/0.23/sbt-1.13.1
  • change: Merge pull request #1086 from http4s/update/series/0.23/scala3-library-3.3.9
  • change: Merge pull request #1087 from http4s/update/flake-lock
  • change: Update sbt, scripted-plugin to 1.13.1 in series/0.23
  • change: Update scala3-library to 3.3.9 in series/0.23
  • change: flake.lock: Update

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

http4s/blaze was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit bda4b45d1ddd798c38b2991861a334bd5d534e67 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.