summaryrefslogtreecommitdiffstats
path: root/src/engine/HTTPClientSender.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-19 22:01:49 +0000
committerDavid Robillard <d@drobilla.net>2011-04-19 22:01:49 +0000
commita90f32d9aef9c93e308de560a975e81c3c86b343 (patch)
tree3fa6e76679297a61d961659b95d46734f8e861c8 /src/engine/HTTPClientSender.cpp
parent74c76bd82792b03bd12f30aa875fae3e5047ccc2 (diff)
downloadingen-a90f32d9aef9c93e308de560a975e81c3c86b343.tar.gz
ingen-a90f32d9aef9c93e308de560a975e81c3c86b343.tar.bz2
ingen-a90f32d9aef9c93e308de560a975e81c3c86b343.zip
Partially fix HTTP.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3173 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/HTTPClientSender.cpp')
-rw-r--r--src/engine/HTTPClientSender.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 6d91a2c0..83d09b97 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -53,13 +53,16 @@ HTTPClientSender::put(const URI& uri,
const Resource::Properties& properties,
Resource::Graph ctx)
{
- const string path = (uri.substr(0, 6) == "path:/") ? uri.substr(6) : uri.str();
- const string full_uri = _url + "/" + path;
+ const std::string request_uri = (Raul::Path::is_path(uri))
+ ? _url + "/patch" + uri.substr(uri.find("/"))
+ : uri.str();
+
Sord::Model model(*_engine.world()->rdf_world());
- for (Resource::Properties::const_iterator i = properties.begin(); i != properties.end(); ++i)
+ for (Resource::Properties::const_iterator i = properties.begin();
+ i != properties.end(); ++i)
model.add_statement(
- Sord::URI(*_engine.world()->rdf_world(), path),
+ Sord::URI(*_engine.world()->rdf_world(), request_uri),
AtomRDF::atom_to_node(model, i->first.str()),
AtomRDF::atom_to_node(model, i->second));