diff --git a/src/bun.js/api/server/StaticRoute.zig b/src/bun.js/api/server/StaticRoute.zig index cfa5cafe21..8948b6e39f 100644 --- a/src/bun.js/api/server/StaticRoute.zig +++ b/src/bun.js/api/server/StaticRoute.zig @@ -249,6 +249,9 @@ pub fn onRequest(this: *StaticRoute, req: *uws.Request, resp: AnyResponse) void } /// Try to serve a compressed variant if compression is enabled and conditions are met +/// +/// NOTE: Streaming responses are NOT handled here - they're rejected at fromJS() line 160 +/// and go through RequestContext instead. This only compresses fully buffered static responses. fn tryServeCompressed(this: *StaticRoute, req: *uws.Request, resp: AnyResponse) bool { const server = this.server orelse return false; const config = server.compressionConfig() orelse return false; diff --git a/src/http/CompressionConfig.zig b/src/http/CompressionConfig.zig index aa7929830b..eb021b81bf 100644 --- a/src/http/CompressionConfig.zig +++ b/src/http/CompressionConfig.zig @@ -24,11 +24,11 @@ pub const COMPRESSION_ENABLED_BY_DEFAULT = false; /// - Only caches variants that clients actually request (lazy) /// - Compression often makes files smaller, but we store BOTH original and compressed /// -/// ## Not Supported (Yet): -/// - Dynamic routes (would need LRU cache with TTL and size limits) -/// - Streaming responses -/// - Cache eviction or memory limits -/// - Selective caching per-route +/// ## Not Supported: +/// - **Dynamic routes** - Responses from fetch() handlers (would need LRU cache with TTL) +/// - **Streaming responses** - ReadableStream bodies are rejected from static routes (see StaticRoute.zig:160) +/// - **Cache eviction** - No memory limits or LRU eviction +/// - **Per-route control** - Can only enable/disable globally or per-algorithm /// /// ## Usage: /// ```js