ad-freiburg / qlever

Very fast SPARQL Engine, which can handle very large knowledge graphs like the complete Wikidata, offers context-sensitive autocompletion for SPARQL queries, and allows combination with text search. It's faster than engines like Blazegraph or Virtuoso, especially for queries involving large result sets.
Apache License 2.0
376 stars 45 forks source link

SERVICE response check is not sufficiently flexible (regression) #1489

Closed ahankinson closed 2 weeks ago

ahankinson commented 2 weeks ago

In this commit by @UNEXENU:

https://github.com/ad-freiburg/qlever/commit/87e33299c49acdd1221f8ae12b9cecb30c58b5eb

The media type response of a SERVICE response was specified, and it now raises an exception on a query that does not match.

However, some services (Wikipedia, https://query.wikidata.org/sparql) can return a media type like this:

application/sparql-results+json;charset=utf-8

This is correct, except that the charset specifier is also included, which is allowed. The result is the SERVICE query fails:

Error while executing a SERVICE request to <https://query.wikidata.org:443/sparql>: QLever requires the endpoint of a SERVICE to send the result as 'application/sparql-results+json' but the endpoint sent 'application/sparql-results+json;charset=utf-8'.

So the new check for the media type of the response is not sufficiently flexible to allow for additional fields in the response type. This is a regression, since our SERVICE query used to work but now it raises an exception.

UNEXENU commented 2 weeks ago

Thank you for reporting this issue.

It seems like i was unaware of the potential existence of parameters in content-types, which lead to this bug.

1490 should fix this / allow parameters in the content-type again.