Skip to content

requests to IPNS URLs may fail #41

@d70-t

Description

@d70-t

As noticed in #39, some gateways don't support requesting format=raw for URLs including a path.

Aparrently, trustless-gateway.link also doesn't support format=car for IPNS links (and according to the spec, only format=ipns-record has to be supported). For this reason, ls and info may fail for IPNS links in similar ways as outlined for #39.

E.g.:

This fails:

IPFS_GATEWAY='https://ipfs.io' python3 -c "import fsspec; fs, _ = fsspec.url_to_fs('ipns://ipfs.io'); print(fs.ls('ipfs.io'))"
...
aiohttp.client_exceptions.ClientResponseError: 406, message='Not Acceptable', url='https://trustless-gateway.link/ipns/ipfs.io?format=car&dag-scope=block'

while the following succeeds (assuming a local kubo instance running):

IPFS_GATEWAY='http://127.0.0.1:8080' python3 -c "import fsspec; fs, _ = fsspec.url_to_fs('ipns://ipfs.io'); print(fs.ls('ipfs.io'))"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions