Description
Requesting a path that resolves to a UnixFS directory returns 404 Not Found from processIpfsResponse. The check entry.type !== 'file' && entry.type !== 'raw' hard-rejects directory entries with no explanation, making the error indistinguishable from a missing resource.
The blocks needed for listing are already present: the SP (Curio/frisbii) returns a path-scoped CAR with dag-scope=all, which includes the directory block and all immediate child link metadata. The 404 is a missing implementation, not an architectural constraint.
Proposed solution
In processIpfsResponse, detect entry.type === 'directory' and handle it separately instead of rejecting it. In
v13.7.3, use entry.content() (not entry.entries()) to iterate children. By default it fetches each child block and resolves a full entry with type, name, path, cid, and size, no extra SP requests are needed because frisbii's dag-scope=all already includes all child blocks in the CAR stream, and blockReadConcurrency: 1 ensures they're consumed in the same DFS order frisbii wrote them.
Done criteria
Notes
Once you start consuming entry.content() to build the listing, the CAR stream advances past those child blocks. If you later try to serve one of those children's file bytes using the same blockstore, blocksReader.next() will return the wrong block.
Description
Requesting a path that resolves to a UnixFS directory returns
404 Not FoundfromprocessIpfsResponse. The checkentry.type !== 'file' && entry.type !== 'raw'hard-rejects directory entries with no explanation, making the error indistinguishable from a missing resource.The blocks needed for listing are already present: the SP (Curio/frisbii) returns a path-scoped CAR with
dag-scope=all, which includes the directory block and all immediate child link metadata. The404is a missing implementation, not an architectural constraint.Proposed solution
In
processIpfsResponse, detectentry.type === 'directory'and handle it separately instead of rejecting it. Inv13.7.3, use
entry.content()(notentry.entries()) to iterate children. By default it fetches each child block and resolves a full entry withtype,name,path,cid, andsize, no extra SP requests are needed because frisbii'sdag-scope=allalready includes all child blocks in the CAR stream, andblockReadConcurrency: 1ensures they're consumed in the same DFS order frisbii wrote them.Done criteria
ipfsRootCid/oripfsRootCid/subdir/where it resolves to a UnixFS directory returns an HTML or JSON listing of its childrenNotes
Once you start consuming
entry.content()to build the listing, the CAR stream advances past those child blocks. If you later try to serve one of those children's file bytes using the same blockstore,blocksReader.next()will return the wrong block.