Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SPARQL "data" protocol (GSP) #5498

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hkwi
Copy link

@hkwi hkwi commented Jun 23, 2023

This patch fixes SMW to send turtle content directly as SPARQL 1.1 GSP POST.
https://www.w3.org/TR/sparql11-http-rdf-update/#http-post

The problem was that internal curl_handler reused the curl options of previous call, and CURLOPT_INFILE did not set the HTTP content.

There was a comment about 4store in GenericRepositoryConnector, but FourstoreRepositoryConnector overrides this part.
4store POST /data/ endpoint only supports content-type of form-urlencoded. https://github.com/4store/4store/blob/fe348295e0e20e1b2192dd08e3ef380d9750ff77/src/http/httpd.c#L1397

In SPARQL 1.1 Graph Store HTTP Protocol (GSP) spec, POST with RDF graph content is the first class, and multipart/form-data may be used as well.

By the way, sending in multipart/form-data is performed by CURLOPT_POSTFIELDS with array of CURLFile instances.

This patch fixes SMW to send turtle content directly as
SPARQL 1.1 GSP POST.
https://www.w3.org/TR/sparql11-http-rdf-update/#http-post

The problem was that internal curl_handler reused the curl
options of previous call, and CURLOPT_INFILE did not set the HTTP content.

There was a comment about 4store in GenericRepositoryConnector, but
FourstoreRepositoryConnector overrides this part.
4store POST /data/ endpoint only supports content-type of form-urlencoded.
https://github.com/4store/4store/blob/fe348295e0e20e1b2192dd08e3ef380d9750ff77/src/http/httpd.c#L1397

In SPARQL 1.1 Graph Store HTTP Protocol (GSP) spec, POST with RDF graph
content is the first class, and multipart/form-data may be used as well.

By the way, sending in multipart/form-data is performed by
CURLOPT_POSTFIELDS with array of CURLFile instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant