Permalink
Browse files

warp-static update

  • Loading branch information...
1 parent 873aea9 commit 321d6d2a0133657ceb67605c069568f7e0d5d72c @snoyberg snoyberg committed Jul 10, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −0 warp-static/warp-static.cabal
  2. +3 −3 warp-static/warp.hs
View
1 warp-static/warp-static.cabal
@@ -23,6 +23,7 @@ Executable warp
, containers >= 0.2
, bytestring >= 0.9.1.4
, text >= 0.7 && < 0.12
+ , mime-types >= 0.1 && < 0.2
source-repository head
type: git
View
6 warp-static/warp.hs
@@ -15,8 +15,8 @@ import qualified Data.ByteString.Char8 as S8
import Control.Arrow ((***))
import Data.Text (pack)
import Data.String (fromString)
-import WaiAppStatic.Mime (defaultMimeMap, mimeByExt, defaultMimeType)
-import WaiAppStatic.Types (ssIndices, toPiece, ssGetMimeType, fileName)
+import Network.Mime (defaultMimeMap, mimeByExt, defaultMimeType)
+import WaiAppStatic.Types (ssIndices, toPiece, ssGetMimeType, fileName, fromPiece)
import Data.Maybe (mapMaybe)
data Args = Args
@@ -49,5 +49,5 @@ main = do
, settingsHost = fromString host
} $ middle $ staticApp (defaultFileServerSettings $ fromString docroot)
{ ssIndices = if noindex then [] else mapMaybe (toPiece . pack) index
- , ssGetMimeType = return . mimeByExt mimeMap defaultMimeType . fileName
+ , ssGetMimeType = return . mimeByExt mimeMap defaultMimeType . fromPiece . fileName
}

0 comments on commit 321d6d2

Please sign in to comment.