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

Adapt different content type for the CAR format #269

Closed
Gozala opened this issue Mar 30, 2023 · 6 comments
Closed

Adapt different content type for the CAR format #269

Gozala opened this issue Mar 30, 2023 · 6 comments

Comments

@Gozala
Copy link
Collaborator

Gozala commented Mar 30, 2023

As @gobengo pointed out there is a application/vnd.ipld.car that is been used by IPFS gateways.

We should switch over to using that as content type.

@Gozala
Copy link
Collaborator Author

Gozala commented Mar 30, 2023

Note we should also figure out a way to do this without breaking existing clients that send requests and expect responses in application/car format.

@Gozala
Copy link
Collaborator Author

Gozala commented Mar 30, 2023

@gobengo on the related note we may also want to negotiate block encoding & hashing algorithm for the blocks inside the CARs. I was thinking using something like application/car+cbor, but sounds like that would not be a good idea. Do you know of a better way ?

@Gozala Gozala mentioned this issue Mar 30, 2023
1 task
@gobengo
Copy link
Contributor

gobengo commented Apr 4, 2023

I was thinking using something like application/car+cbor

I think that's about as good as it gets in media types. 'structured syntax suffix'
Helpful backstory here:
https://www.rfc-editor.org/rfc/rfc6838.html#section-4.2.8

Do you know of a better way ?

Nope. It's line with things like application/ld+json.
Or this with multiple (but afaict there are not great exemplars for composing many suffixes like this) application/credential+ld+json

@gobengo
Copy link
Contributor

gobengo commented Apr 5, 2023

I was thinking using something like application/car+cbor

Perhaps it should be {otherMediaType}+car e.g. application/cbor+car 🤔 (via @jonnycrunch here sort of)

@gobengo
Copy link
Contributor

gobengo commented Apr 5, 2023

For our cases, application/vnd.ipld.car.json probably makes sense (when debugging an ipld.car response as car->dag-json)

@Gozala
Copy link
Collaborator Author

Gozala commented May 3, 2023

This got fixed in 7.0.0

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

No branches or pull requests

2 participants