Consider a forgotten match case
authorChristos KK Loverdos <loverdos@gmail.com>
Mon, 2 Jul 2012 11:14:00 +0000 (14:14 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Mon, 2 Jul 2012 11:14:00 +0000 (14:14 +0300)
Note that the now two last cases can be merged to one like this:

- case _ => ...

but we keep them separate just to make it clear what is going on and to
easily change the response for each case if such a need arises.

src/main/scala/gr/grnet/aquarium/service/FinagleRESTService.scala

index 2d59fdb..2602e0f 100644 (file)
@@ -151,6 +151,9 @@ class FinagleRESTService extends Lifecycle with AquariumAwareSkeleton with Confi
           case Some(`headerValue`) ⇒
             service(request)
 
+          case Some(_) ⇒
+            statusResponse(FORBIDDEN)
+
           case None ⇒
             statusResponse(FORBIDDEN)
         }