I still have this issue with version 2.6.5
Doing a HTTP POST against
http://localhost:8080/openrdf-sesame/repositories/OWMS
with CONSTRUCT query.
+ is lost
Response from curl, missing "+" indicated with <--------
{
overheid:OWMSdataset a void:Dataset ;
dcterms:creator overheid:ICTU ;
dcterms:description "De dataset van de Nederlandse overheid"@nl ;
dcterms:license <
http://www.gnu.org/copuleft/fdl.html> ;
dcterms:title "OWMS dataset" ;
void:Feature _:node16qqueel9x25 .
_:node16qqueel9x25 dcterms:format "text/rdf n3" . <---------
overheid:OWMSdataset void:Feature _:node16qqueel9x26 .
_:node16qqueel9x26 dcterms:format "application/rdf xml" . <--------
overheid:OWMSdataset void:exampleResource <
http://standaarden.overheid.nl/owms/terms/Schiermonnikoog_(gemeente)> , overheid:omgevingsvergunning , overheid:ROM_Rijnmond ;
void:statItem _:node16qqueel9x27 .
_:node16qqueel9x27 rdf:value "6471"^^xsd:integer ;
scovo:dimension void:numberOfResources , dcterms:Agent .
overheid:OWMSdataset void:statItem _:node16qqueel9x32 .
_:node16qqueel9x32 rdf:value "3500"^^xsd:integer ;
scovo:dimension void:numberOfResources , skos:Concept .
overheid:OWMSdataset void:statItem _:node16qqueel9x31 .
_:node16qqueel9x31 rdf:value "3912"^^xsd:integer ;
scovo:dimension void:numberOfResources , dcterms:Location .
overheid:OWMSdataset void:statItem _:node16qqueel9x30 .
_:node16qqueel9x30 rdf:value "42527"^^xsd:integer ;
scovo:dimension void:numberOfTriples .
overheid:OWMSdataset void:statItem _:node16qqueel9x29 .
_:node16qqueel9x29 rdf:value "4550"^^xsd:integer ;
scovo:dimension void:numberOfDistinctSubjects .
overheid:OWMSdataset void:statItem _:node16qqueel9x28 .
_:node16qqueel9x28 rdf:value "6240"^^xsd:integer ;
scovo:dimension void:numberOfDistinctObjects .
overheid:OWMSdataset void:uriRegexPattern "
http://standaarden.overheid.nl/owms/terms/. " ; <---------------
void:vocabulary <
http://www.w3.org/2008/05/skos-xl#> , <
http://www.w3.org/1999/02/22-rdf-syntax-ns#> , <
http://www.w3.org/2000/01/rdf-schema#> , <
http://xmlns.com/foaf/0.1/> , <
http://www.w3.org/2004/02/skos/core#> , <
http://purl.org/dc/terms/> , <
http://www.w3.org/2001/XMLSchema#> , <
http://standaarden.overheid.nl/owms/terms/> , <
http://www.w3.org/2002/07/owl#> .
}
Same happens in REST Client for Firefox, HTTP Client, cREst for Chrome
Thanks for additional details, will take another look at this ASAP.
This is not a bug in Sesame, but a mistake in the way the client sends the data to Sesame.
From your comments, I see you are using curl to send the query to Sesame, so I assume you do something like this:
curl -d "query=CONSTRUCT {?X ?P ?Y ; <foo:bar> \"text/rdf+n3\" } WHERE {?X ?P ?Y}"
http://localhost:8080/openrdf-sesame/repositories/test
However, the server expects the post-data to be urlencoded, otherwise the + character (which is a special character) is not preserved when sent to the server. This can be achieved (in curl) by using the --data-urlencoded switch instead:
curl --data-urlencode "query=CONSTRUCT {?X ?P ?Y ; <foo:bar> \"text/rdf+n3\" } WHERE {?X ?P ?Y}"
http://localhost:8080/openrdf-sesame/repositories/test
Alternatively, you can of course urlencode the problematic characters manually:
curl -d "query=CONSTRUCT {?X ?P ?Y ; <foo:bar> \"text/rdf%2Bn3\" } WHERE {?X ?P ?Y}"
http://localhost:8080/openrdf-sesame/repositories/test
See the <a href="
http://curl.haxx.se/docs/manpage.html#--data-urlencode">curl manual page</a> for more info.
Reopening because I need to doublecheck that the problem doesn't occur when using sesame's own http client directly.
Confirmed that Sesame HTTP client (and Sesame console and workbench) handle this correctly as well.
Yes indeed.
My own fault. Mea culpa.
Apologies for having posted this.