From a90f32d9aef9c93e308de560a975e81c3c86b343 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Apr 2011 22:01:49 +0000 Subject: Partially fix HTTP. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3173 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/HTTPClientSender.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/engine/HTTPClientSender.cpp') 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)); -- cgit v1.2.1