diff options
author | tradke <tradke@83718e91-0e4f-0410-abf4-91180603181f> | 2007-08-22 10:26:03 +0000 |
---|---|---|
committer | tradke <tradke@83718e91-0e4f-0410-abf4-91180603181f> | 2007-08-22 10:26:03 +0000 |
commit | dcf7f5fac40b4b982f4ebb31d86fa865683cac4c (patch) | |
tree | 359bab92b5181c063d14ff038b3660a4142fb774 | |
parent | 99ddac2d94b2e6dcba4fb6b53b197e9cd531126e (diff) |
use HTTP PUT to create a new RDF context
use HTTP POST to add to or update an existing RDF context
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@128 83718e91-0e4f-0410-abf4-91180603181f
-rw-r--r-- | src/rdf.cc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -384,11 +384,12 @@ namespace Formaline if (*rdf_hostname[i]) { // Create the data + // use PUT to create a new context and + // POST to add metadata to an existing one ostringstream databuf; databuf - // currently the RDF server only understands HTTP PUT - // << "POST HTTP/1.0 200\r\n" -<< "PUT /context/CactusSimulations/" << jobID << " HTTP/1.0\r\n" +<< (get_state() == initial ? "PUT" : "POST") +<< " /context/CactusSimulations/" << jobID << " HTTP/1.0\r\n" << "Host: " << rdf_hostname[i] << "\r\n" << "Content-Type: application/rdf+xml\r\n" << "Content-Length: " << msgstr.length() << "\r\n" |