paulovn / sparql-kernel

A Jupyter kernel to launch queries against SPARQL endpoints
BSD 3-Clause "New" or "Revised" License
98 stars 17 forks source link

SPARUL updates: HTTP response encoding expectations too restrictive #16

Closed u-u-h closed 7 years ago

u-u-h commented 7 years ago

When using an %endpoint to submit SparQL Update (SPARUL) update statements like LOAD, the W3C spec does not specify much about the response format. Some implementations like CGE return no useful HTTP body, with a "200 OK" or "204 No Content" code and a content body format of text/html. That seems permitted by the spec.

The current implementation sets the acceptable mime types (connection.py:36 and following) to application/sparql-results+json , text/rdf or similar, but cannot deal with text/* in general.

It would be good to either introduce an '%update-endpoint' and use that for SPARUL commands, or at least have a %format specifier that can be set near SPARUL commands to handle the no-result situation appropriately.

--uuh

paulovn commented 7 years ago

You are right. I wasn't thinking on SPARQL Update when developing the code, so it is not considered.

https://github.com/paulovn/sparql-kernel/pull/17 should fix this. Specifically:

Tell me if it works. Thanks for detecting this.

paulovn commented 7 years ago

Should be fixed in version 1.0.5