skohub-io / skohub-vocabs

A lightweight tool to publish SKOS Vocabularies
https://skohub.io/
Apache License 2.0
32 stars 25 forks source link

Content negotiation is broken #282

Closed acka47 closed 7 months ago

acka47 commented 7 months ago

As far as I can see, the curl example from https://github.com/skohub-io/skohub-vocabs/issues/23#issuecomment-522589094 is not working anymore, e.g.:

$ curl -LIH "Accept: application/ld+json" http://w3id.org/class/hochschulfaecher/scheme
HTTP/1.1 301 Moved Permanently
Date: Fri, 01 Dec 2023 15:42:04 GMT
Server: Apache/2.4.29 (Ubuntu)
Access-Control-Allow-Origin: *
Location: https://w3id.org/class/hochschulfaecher/scheme
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 404 Not Found
Date: Fri, 01 Dec 2023 15:42:05 GMT
Server: Apache/2.4.29 (Ubuntu)
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=iso-8859-1

I assume, we have no tests for this?

sroertgen commented 7 months ago

Is the link correct? shouldn't it be https://w3id.org/kim/hochschulfaechersystematik/scheme

acka47 commented 7 months ago

Ah, yes, sorry. This was an old link. The correct one works, for JSON-LD:

$ curl -LIH "Accept: application/ld+json" https://w3id.org/kim/hochschulfaechersystematik/scheme
HTTP/1.1 302 Found
Date: Fri, 01 Dec 2023 16:01:36 GMT
Server: Apache/2.4.29 (Ubuntu)
Access-Control-Allow-Origin: *
Location: https://skohub.io/dini-ag-kim/hochschulfaechersystematik/heads/master/w3id.org/kim/hochschulfaechersystematik/scheme
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Fri, 01 Dec 2023 16:01:37 GMT
Server: Apache/2.4.52 (Ubuntu)
Content-Location: scheme.jsonld
Vary: negotiate,accept,accept-language
TCN: choice
Last-Modified: Mon, 11 Sep 2023 06:21:02 GMT
ETag: "12861-6050f54a43268;6050f54a43268
Accept-Ranges: bytes
Content-Length: 75873
Access-Control-Allow-Origin: *
Content-Type: application/ld+json

So, I will close this ticket. (Somehow, I thought we had also supported other RDF serializations but apparently, we never did so, As nobody has asked for it yet, I will not open a ticket for this.)