On 12/21/16 7:25 AM, Nikolaos Beredimas wrote:
> I am trying to POST a SPARQL query using the "query via POST directly"
> method described in SPARQL 1.1 Protocol ( paragraph 2.1.3)
> (https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-via-post-direct)
>
> However I am confused if Virtuoso actually does support this method
> I have managed to work both with GET and URL-encoded POST (at the same
> /sparql path)
> but when trying the direct POST method I get a 409 Invalid Path
>
>
>     curl -i -X POST -H "Content-Type: application/sparql-query" -d
>     'SELECT * WHERE { ?s ?p ?o . }' "http://localhost:8890/sparql";
>
>     HTTP/1.1 409 Invalid path
>     Server: Virtuoso/07.20.3215 (Win64) x86_64-generic-win-64
>     Connection: Keep-Alive
>     Content-Type: text/html; charset=UTF-8
>     Date: Wed, 21 Dec 2016 12:09:51 GMT
>     Accept-Ranges: bytes
>     Content-Length: 0
>
> Just to make sure it's not a problem on the request side, I launched a
> Jena Fuseki instance just for testing, and it appears to work correctly:
>  curl -i -X POST -H "Content-Type: application/sparql-query" -d
> 'SELECT * WHERE { ?s ?p ?o . }' "http://localhost:3333/mytest/sparql";
> HTTP/1.1 200 OK
> Date: Wed, 21 Dec 2016 12:14:47 GMT
> Fuseki-Request-ID: 2
> Cache-Control: must-revalidate,no-cache,no-store
> Pragma: no-cache
> Content-Type: application/sparql-results+json; charset=utf-8
> Transfer-Encoding: chunked
>
> {
>   "head": {
>     "vars": [ "s" , "p" , "o" ]
>   } ,
>   "results": {
>     "bindings": [
>
>     ]
>   }
> }
>
>
>
>
> I have tried using Virtuoso VOS 7.20.3215 & 7.20.3217 
>
> Now, there have been a couple of threads in the past referencing the
> same issue, but unfortunately it was never resolved.
>
> So is it me doing something wrong, is it a bug, or does Virtuoso not
> support this method?
> Because the " 409 Invalid Path" doesn't make any sense to me.
> Note that if I ommit the Content-Type: application/sparql-query header
> I simply get back the SPARQL HTML page, so clearly there is something
> going wrong but the error message is either wrong or cryptic

Reproduced using:

curl -i -X POST -H "Content-Type: application/sparql-query" -d 'SELECT *
WHERE { ?s a ?o . } limit 5' "http://dbpedia.org/sparql/";
HTTP/1.1 409 Invalid path
Date: Wed, 21 Dec 2016 14:01:15 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Server: Virtuoso/07.20.3217 (Linux) i686-generic-linux-glibc212-64  VDB
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers:
DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Accept-Encoding


That's a bug. Basically, functionality has regressed. It will be looked
into, quickly.

-- 
Regards,

Kingsley Idehen       
Founder & CEO 
OpenLink Software   (Home Page: http://www.openlinksw.com)

Weblogs (Blogs):
Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
Blogspot Blog: http://kidehen.blogspot.com
Medium Blog: https://medium.com/@kidehen

Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen

Web Identities (WebID):
Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this
        : 
http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to