Closed aljoshakoecher closed 1 year ago
After some wasted hours I just stumbled across an issue in the W3id repo that helped me resolve this issue: https://github.com/perma-id/w3id.org/issues/2021
Solution: Protege seems to expect a 303 status code. Imports worked for me as soon as I changed from 301 to 303 for the ontology redirects.
Hey everyone, I am setting up a W3ID redirect and I want to ensure content negotiation, i.e.
Furthermore, I want to have proper versioning for the ontology so that a specific version may be imported. For all this, I have created the following .htaccess file:
What this does is basically: Check the HTTP Accept header. If it is set to
application/rdf+xml
ortext/turtle
then serve the ontology file. If the URL contains a version, use that version to get the exact ontology version. If there is no version, return the current file of the main branch. If the HTTP Accept asks for HTML, just redirect to the repository page.Now to the problem:
*/*
, the redirect for a URL with version works, too.Why does Protege set different HTTP Accept headers for these two URLs?
Is this intentional?