diff --git a/mighttpd2.cabal b/mighttpd2.cabal
--- a/mighttpd2.cabal
+++ b/mighttpd2.cabal
@@ -1,5 +1,5 @@
 Name:                   mighttpd2
-Version:                3.0.6
+Version:                3.1.0
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -56,9 +56,9 @@
                       , unix
                       , unix-time
                       , unordered-containers
-                      , wai >= 2.1 && < 3.0
-                      , wai-app-file-cgi >= 1.0
-                      , warp >= 2.1 && < 3.0
+                      , wai >= 3.0
+                      , wai-app-file-cgi >= 3.0
+                      , warp >= 3.0
 
 Executable mighty
   Default-Language:     Haskell2010
@@ -79,10 +79,10 @@
                       , conduit-extra
                       , transformers
                       , unix
-                      , wai >= 2.0
-                      , wai-app-file-cgi >= 2.0
+                      , wai >= 3.0
+                      , wai-app-file-cgi >= 3.0
                       , wai-logger >= 2.1
-                      , warp >= 2.0
+                      , warp >= 3.0
   if flag(tls)
     Build-Depends:      tls
                       , warp-tls >= 1.4.1
diff --git a/src/WaiApp.hs b/src/WaiApp.hs
--- a/src/WaiApp.hs
+++ b/src/WaiApp.hs
@@ -16,31 +16,31 @@
 
 fileCgiApp :: ClassicAppSpec -> FileAppSpec -> CgiAppSpec -> RevProxyAppSpec
            -> RouteDB -> Application
-fileCgiApp cspec filespec cgispec revproxyspec um req = case mmp of
+fileCgiApp cspec filespec cgispec revproxyspec um req respond = case mmp of
     Fail -> do
         let st = preconditionFailed412
         liftIO $ logger cspec req' st Nothing
-        fastResponse st defaultHeader "Precondition Failed\r\n"
+        fastResponse respond st defaultHeader "Precondition Failed\r\n"
     Redirect -> do
         let st = movedPermanently301
             hdr = defaultHeader ++ redirectHeader req'
         liftIO $ logger cspec req st Nothing
-        fastResponse st hdr "Moved Permanently\r\n"
+        fastResponse respond st hdr "Moved Permanently\r\n"
     Found (RouteFile  src dst) ->
-        fileApp cspec filespec (FileRoute src dst) req'
+        fileApp cspec filespec (FileRoute src dst) req' respond
     Found (RouteRedirect src dst) ->
-        redirectApp cspec (RedirectRoute src dst) req'
+        redirectApp cspec (RedirectRoute src dst) req' respond
     Found (RouteCGI   src dst) ->
-        cgiApp cspec cgispec (CgiRoute src dst) req'
+        cgiApp cspec cgispec (CgiRoute src dst) req' respond
     Found (RouteRevProxy src dst dom prt) ->
-        revProxyApp cspec revproxyspec (RevProxyRoute src dst dom prt) req
+        revProxyApp cspec revproxyspec (RevProxyRoute src dst dom prt) req respond
   where
     (host, _) = hostPort req
     path = urlDecode False $ rawPathInfo req
     mmp = case getBlock host um of
         Nothing  -> Fail
         Just blk -> getRoute path blk
-    fastResponse st hdr body = return $ responseLBS st hdr body
+    fastResponse resp st hdr body = resp $ responseLBS st hdr body
     defaultHeader = [("Content-Type", "text/plain")
                     ,("Server", softwareName cspec)]
     req' = req { rawPathInfo = path } -- FIXME
