diff --git a/Network/Wai/Application/Classic/CGI.hs b/Network/Wai/Application/Classic/CGI.hs
--- a/Network/Wai/Application/Classic/CGI.hs
+++ b/Network/Wai/Application/Classic/CGI.hs
@@ -116,6 +116,13 @@
 #if __GLASGOW_HASKELL__ >= 707
       , delegate_ctlc = False
 #endif
+#if __GLASGOW_HASKELL__ >= 800
+      , detach_console = False
+      , create_new_console = False
+      , new_session = False
+      , child_group = Nothing
+      , child_user = Nothing
+#endif
       }
     (prog, scriptName, pathinfo) =
         pathinfoToCGI (cgiSrc cgii)
diff --git a/Network/Wai/Application/Classic/Field.hs b/Network/Wai/Application/Classic/Field.hs
--- a/Network/Wai/Application/Classic/Field.hs
+++ b/Network/Wai/Application/Classic/Field.hs
@@ -64,7 +64,7 @@
   | otherwise = [(hContentType, mimeType file)]
 
 mimeType :: ByteString -> MimeType
-mimeType file =fromMaybe defaultMimeType . foldr1 mplus . map lok $ targets
+mimeType file = fromMaybe defaultMimeType . foldr mplus Nothing . map lok $ targets
   where
     targets = extensions file
     lok x = SH.lookup x defaultMimeTypes'
diff --git a/test/ClassicSpec.hs b/test/ClassicSpec.hs
--- a/test/ClassicSpec.hs
+++ b/test/ClassicSpec.hs
@@ -29,6 +29,11 @@
             bdy <- rspBody <$> sendGET url
             ans <- readFileAscii "test/html/index.html"
             bdy `shouldBe` ans
+        it "works with files that lack a file extension" $ do
+            let url = "http://127.0.0.1:2345/no_extension"
+            bdy <- rspBody <$> sendGET url
+            ans <- readFileAscii "test/html/no_extension"
+            bdy `shouldBe` ans
         it "returns 400 if not exist" $ do
             let url = "http://127.0.0.1:2345/dummy"
             sc <- rspCode <$> sendGET url
diff --git a/wai-app-file-cgi.cabal b/wai-app-file-cgi.cabal
--- a/wai-app-file-cgi.cabal
+++ b/wai-app-file-cgi.cabal
@@ -1,5 +1,5 @@
 Name:                   wai-app-file-cgi
-Version:                3.1.1
+Version:                3.1.2
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
