LinkedDataFragments / Server.Java

A Triple Pattern Fragments server for Java
MIT License
27 stars 20 forks source link

Error when passing application/ld+json in accept header #54

Open rubensworks opened 5 years ago

rubensworks commented 5 years ago

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

mielvds commented 5 years ago

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