dbcls / LinkedData-Agora

4 stars 0 forks source link

The Query used to test Turtle format must be a CONSTRUCT or a DESCRIBE query #127

Closed JervenBolleman closed 5 years ago

JervenBolleman commented 6 years ago
SELECT  *WHERE {        GRAPH ?g { ?s ?p ?o } .      }LIMIT 1

Should really be

CONSTRUCT {?s ?p?o}
WHERE { GRAPH ?g { ?s ?p ?o } . }
LIMIT 1

When asking for content-type turtle. This is because SPARQL1.1 does not define an RDF output for the SELECT or ASK queries. Only construct and describe can give RDF output therefore a select is not valid..

yayamamo commented 6 years ago

When checking the code, we use the query you quoted to check whether an endpoint is alive or not, and therefore, as for this query, we do not think our crawler assumes any format.

JervenBolleman commented 6 years ago

Well, yes, but a very good endpoint like the uniprot.org one will tell the user that they are asking for the impossible and return a client error. Giving minus points :(

It would be better to check that the query and content result matches to avoid penalizing endpoints that help the users.

yayamamo commented 5 years ago

Thank you for your comment. This issue has been fixed!