+ HEAD (not tested)
authorAlexandre Bertails <bertails@gmail.com>
Mon, 29 Aug 2011 00:09:17 -0400
changeset 21 6cce50b70e79
parent 20 e9f01d09f6ad
child 22 209fb5cf5c2a
+ HEAD (not tested)
src/main/scala/Main.scala
--- a/src/main/scala/Main.scala	Sun Aug 28 23:58:13 2011 -0400
+++ b/src/main/scala/Main.scala	Mon Aug 29 00:09:17 2011 -0400
@@ -30,10 +30,13 @@
       val baseURI = req.underlying.getRequestURL.toString
       val r:Resource = rm.resource(new URL(baseURI))
       req match {
-        case GET(_) => {
+        case GET(_) | HEAD(_) => {
           val model:Model = r.get()
           val encoding = RDFEncoding(req)
-          Ok ~> ViaSPARQL ~> ResponseModel(model, baseURI, encoding)
+          req match {
+            case GET(_) => Ok ~> ViaSPARQL ~> ResponseModel(model, baseURI, encoding)
+            case HEAD(_) => Ok ~> ViaSPARQL
+          }
         }
         case PUT(_) => {
           val bodyModel = modelFromInputStream(Body.stream(req), baseURI)