Skip to content

Commit c819537

Browse files
committed
docs(trustless-gateway): restructure recursion section
move rationale from main body to note, keeping only normative SHOULD statements in main body for scannability
1 parent 41a766d commit c819537

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/http-gateways/trustless-gateway.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,13 @@ In LAN environments, getting a TLS certificate setup with which to use HTTPS may
600600

601601
Trustless Gateways operating in P2P contexts SHOULD NOT recursively search for content.
602602

603-
In P2P networks, gateways typically serve as block stores for specific peers or content, rather than attempting to locate content across the entire network. Content discovery is handled separately by the P2P layer (e.g., Amino DHT, delegated routing), not by individual HTTP gateways.
604-
605-
Gateways that do not have content locally SHOULD return `404 Not Found` rather than attempting to fetch from other gateways or peers. This allows clients to efficiently query multiple gateways in parallel and discover which ones have the content cached.
603+
Gateways that do not have content locally SHOULD return `404 Not Found` rather than attempting to fetch from other gateways or peers.
606604

607605
:::note
608606

609-
This behavior aligns with the non-recursive gateway model where gateways serve only cached or pre-fetched content. Clients are responsible for content routing and choosing which gateways to query. See also the [`Cache-Control: only-if-cached`](#cache-control-only-if-cached-request-header) header for client-side control of this behavior.
607+
In P2P networks, gateways serve as block stores for specific peers or content, rather than attempting to locate content across the entire network. Content discovery is handled by the P2P layer (e.g., Amino DHT, delegated routing), not by individual HTTP gateways. Clients are responsible for content routing and choosing which gateways to query.
608+
609+
Returning `404 Not Found` for missing content allows clients to efficiently query multiple gateways in parallel and discover which ones have the content cached. See also the [`Cache-Control: only-if-cached`](#cache-control-only-if-cached-request-header) header for client-side control of this behavior.
610610

611611
:::
612612

0 commit comments

Comments
 (0)