From 32683b5232810fbda7163914295b1baaae738658 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 1 Sep 2025 21:10:00 +0200 Subject: [PATCH 1/2] test: add third option for CAR non-existing path responses add temporary support for legacy 200 with X-Stream-Error header behavior when missing blocks are detected during streaming. this ensures compatibility with current boxo/gateway implementations that defer header setting. relates to ipfs/boxo@1ac242a6 which fixes CAR handler to properly return 404 status codes instead of 200 with X-Stream-Error TODO: remove once Kubo ships with https://github.com/ipfs/boxo/pull/1019 --- tests/trustless_gateway_car_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/trustless_gateway_car_test.go b/tests/trustless_gateway_car_test.go index 805e20692..90adef01f 100644 --- a/tests/trustless_gateway_car_test.go +++ b/tests/trustless_gateway_car_test.go @@ -122,6 +122,14 @@ func TestTrustlessCarPathing(t *testing.T) { // Implementations with efficient path checks: 404 Not Found Expect(). Status(404), + // TODO: remove once Kubo ships with https://github.com/ipfs/boxo/pull/1019 + // Legacy behavior: 200 with X-Stream-Error header when missing blocks detected during streaming + // is returned by boxo/gateway with remote car backend that implements the above PR + Expect(). + Status(200). + Headers( + Header("X-Stream-Error").Not().IsEmpty(), + ), ), }, } From 1b10e2662e7fcf43463a768f421e1ab5a601a649 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 1 Sep 2025 21:12:56 +0200 Subject: [PATCH 2/2] docs: add v0.8.3 changelog entry document temporary support for legacy X-Stream-Error header behavior in CAR responses for non-existing paths --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80a4a4f3c..c2e18a126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.3] - 2025-09-01 +### Changed +- Added temporary support for legacy 200 with X-Stream-Error header behavior when missing blocks are detected during CAR streaming. This ensures compatibility with current boxo/gateway implementations that defer header setting. This third option will be removed once implementations ship with [ipfs/boxo#1019](https://github.com/ipfs/boxo/pull/1019). [#245](https://github.com/ipfs/gateway-conformance/pull/245) + ## [0.8.2] - 2025-08-31 ### Changed - Relaxed CAR tests to accept both HTTP 200 and 404 for non-existing paths. The response code now depends on implementation details such as locality and cost of path traversal checks. Implementations that can efficiently detect non-existing paths should return 404 (improved behavior per [ipfs/boxo#458](https://github.com/ipfs/boxo/issues/458)). Implementations focusing on stateless streaming and low latency may return 200 with partial CAR up to the missing link (legacy behavior). [#244](https://github.com/ipfs/gateway-conformance/pull/244)