Server.Java icon indicating copy to clipboard operation
Server.Java copied to clipboard

Error when passing application/ld+json in accept header

Open rubensworks opened this issue 6 years ago • 1 comments

I discovered this on the Wikidata TPF endpoint:

Accept header containing application/ld+json:

$ curl -H 'Accept: application/trig;q=1.0,application/ld+json;q=0.9,application/n-quads;q=0.7,text/turtle;q=0.6,application/rdf+xml;q=0.5' https://query.wikidata.org/bigdata/ldf

-> Returns 500

Accept header containing application/json:

$ curl -H 'Accept: application/trig;q=1.0,application/json;q=0.9,application/n-quads;q=0.7,text/turtle;q=0.6,application/rdf+xml;q=0.5' https://query.wikidata.org/bigdata/ldf

-> Returns 200 as Turtle.

The problem occurs when querying Wikidata with Comunica, but it does not occur when querying with Client.js, as the latter does not accept JSON-LD serializations.

May be related to https://github.com/LinkedDataFragments/Server.Java/issues/47

This is a blocker for https://github.com/comunica/jQuery-Widget.js/issues/25

rubensworks avatar May 07 '19 12:05 rubensworks

I'm guessing a bug in https://github.com/LinkedDataFragments/Server.Java/blob/master/src/main/java/org/linkeddatafragments/util/MIMEParse.java.

mielvds avatar May 07 '19 12:05 mielvds