ResearchObject / ro-crate

Research Object Crate
https://w3id.org/ro/crate/
Apache License 2.0
78 stars 34 forks source link

Content negotiation for RO-Crate identifier #297

Open dgarijo opened 1 month ago

dgarijo commented 1 month ago

Describe the bug Doing:

curl -sH "Accept:application/ld+json" -L https://w3id.org/ro/crate/1.1 

Returns HTML instead of the contents of https://www.researchobject.org/ro-crate/1.1/ro-crate-metadata.json, which should be the right response in this case.

Also, I think that

curl -sH "Accept:application/ld+json" -L https://w3id.org/ro/crate 

Should resolve to the latest official version of the RO-Crate spec

Suggested fix Fix the content negotiation in w3id.org.

dgarijo commented 1 month ago

Maybe related to #228

dgarijo commented 1 month ago

@stain says that https://github.com/perma-id/w3id.org/blob/master/ro/crate/.htaccess does not have content negotiation enabled

stain commented 1 month ago

Now that we have Profile Crates in 1.2-DRAFT and also a historical 1.1 RO-Crate we should add this to the w3id so we comply with our own #296 on retrieval!

Note that 1.0 does not have an RO-Crate representation of itself and neither do we have a https://www.researchobject.org/ro-crate/ro-crate-metadata.json so this would for now only be on the versioned URIs. Not sure how to do the latest one for https://w3id.org/ro/crate -- by symlink perhaps? For 1.2-DRAFT (1.2 when released) it's a Detached Crate so it does not matter where it's served from.