Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ambiguity about tar/car request pathing support #488

Closed
SgtPooki opened this issue Feb 3, 2025 · 2 comments · Fixed by #489
Closed

bug: ambiguity about tar/car request pathing support #488

SgtPooki opened this issue Feb 3, 2025 · 2 comments · Fixed by #489

Comments

@SgtPooki
Copy link
Member

SgtPooki commented Feb 3, 2025

I’m looking at https://specs.ipfs.tech/http-gateways/path-gateway/#accept-request-header and thinking about recent verified-fetch changes.

For vnd.ipld.car and x-tar requests to the gateway, are paths expected to be supported? i.e. can I request a tar/car for bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze/58wiki/6F or QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D/albums instead of having to resolve the CID of the content at that path myself and then requesting that resolved CIDs content?

@lidel
Copy link
Member

lidel commented Feb 3, 2025

TAR and CAR are separate response types with different behaviors.

  • CAR responses are trustless, so to be able to verify end-to-end (from root CID to final terminating filename) response always includes extra blocks that allow walking the parents
    • see dag-scope:

      Describes the shape of the DAG fetched the terminus of the specified path whose blocks are included in the returned CAR file after the blocks required to traverse path segments.

  • TAR responses are deserialized, so they only include the file or directory at terminating segment

@lidel
Copy link
Member

lidel commented Feb 3, 2025

I think the fix here is to clarify CAR in https://specs.ipfs.tech/http-gateways/path-gateway/#accept-request-header to include the same note as we have in dag-scope + make TAR more explicit that we mean root of terminus element

Filled:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants