[
https://issues.apache.org/jira/browse/JENA-1589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joachim Neubert resolved JENA-1589.
-----------------------------------
Resolution: Not A Bug
> POST query with comments fails
> ------------------------------
>
> Key: JENA-1589
> URL: https://issues.apache.org/jira/browse/JENA-1589
> Project: Apache Jena
> Issue Type: Bug
> Components: Fuseki
> Affects Versions: Jena 3.8.0
> Reporter: Joachim Neubert
> Priority: Major
>
> With a query file /tmp/test.rq
> ---------------
> select *
> where {
> ?s ?p ?o
> } limit 10
> ---------------
> curl -X POST -H "Content-type: application/sparql-query" --data @/tmp/test.rq
> http://localhost:3030/stw/query
> works nicely, whereas
> ---------------
> # test query
> select *
> where {
> ?s ?p ?o
> } limit 10
> ---------------
> fails with the message:
> Error 400: Parse error:
> # test queryselect *where {?s ?p ?o} limit 10
> Encountered "<EOF>" at line 1, column 45.
> Was expecting one of:
> "\ufeff" ...
> "base" ...
> "prefix" ...
> "select" ...
> "json" ...
> "describe" ...
> "construct" ...
> "ask" ...
> Fuseki - version 3.8.0 (Build date: 2018-06-25T11:00:34+0000)
> The spec (https://www.w3.org/TR/sparql11-protocol/#query-via-post-direct)
> says “When using this approach, clients must include the SPARQL query string,
> unencoded, and nothing else as the message body of the request”. I’d hope
> “nothing else” does not preclude comment lines. Rather I'd suspect that the
> concatination "# test queryselect " causes the error.
> Cheers, Joachim
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)