Change handle application/sparql-update as well as application/sparql-query in a POST works-for-tim tip
authorTim Berners-Lee <timbl+hg@w3.org>
Fri, 16 Aug 2013 14:52:48 -0400
branchworks-for-tim
changeset 240 f031ec2e2172
parent 239 258d2757ef3d
Change handle application/sparql-update as well as application/sparql-query in a POST
src/main/scala/Post.scala
--- a/src/main/scala/Post.scala	Sun Jul 15 01:26:25 2012 +0200
+++ b/src/main/scala/Post.scala	Fri Aug 16 14:52:48 2013 -0400
@@ -24,7 +24,8 @@
 object Post {
   
   val SPARQL = "application/sparql-query"
-  val supportContentTypes = Lang.supportContentTypes ++ Image.supportedImages.map(_.contentType) + SPARQL
+  val SPARQLUPDATE = "application/sparql-update"
+  val supportContentTypes = Lang.supportContentTypes ++ Image.supportedImages.map(_.contentType) + SPARQL + SPARQLUPDATE
   val supportedAsString = supportContentTypes mkString ", "
 
   def supportsContentType(contentTypeHeader: String) = {
@@ -68,6 +69,7 @@
     
     cleanHeader(contentType) match {
       case SPARQL => postUpdate | (postQuery | PostUnknown)
+      case SPARQLUPDATE => postUpdate | (postQuery | PostUnknown)
       case RequestLang(lang) => postRDF(lang) | PostUnknown
       case GIF.contentType | JPEG.contentType | PNG.contentType => PostBinary(is)
     }