Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
warp-static update
  • Loading branch information
snoyberg committed Jul 10, 2012
1 parent 873aea9 commit 321d6d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions warp-static/warp-static.cabal
Expand Up @@ -23,6 +23,7 @@ Executable warp
, containers >= 0.2 , containers >= 0.2
, bytestring >= 0.9.1.4 , bytestring >= 0.9.1.4
, text >= 0.7 && < 0.12 , text >= 0.7 && < 0.12
, mime-types >= 0.1 && < 0.2


source-repository head source-repository head
type: git type: git
Expand Down
6 changes: 3 additions & 3 deletions warp-static/warp.hs
Expand Up @@ -15,8 +15,8 @@ import qualified Data.ByteString.Char8 as S8
import Control.Arrow ((***)) import Control.Arrow ((***))
import Data.Text (pack) import Data.Text (pack)
import Data.String (fromString) import Data.String (fromString)
import WaiAppStatic.Mime (defaultMimeMap, mimeByExt, defaultMimeType) import Network.Mime (defaultMimeMap, mimeByExt, defaultMimeType)
import WaiAppStatic.Types (ssIndices, toPiece, ssGetMimeType, fileName) import WaiAppStatic.Types (ssIndices, toPiece, ssGetMimeType, fileName, fromPiece)
import Data.Maybe (mapMaybe) import Data.Maybe (mapMaybe)


data Args = Args data Args = Args
Expand Down Expand Up @@ -49,5 +49,5 @@ main = do
, settingsHost = fromString host , settingsHost = fromString host
} $ middle $ staticApp (defaultFileServerSettings $ fromString docroot) } $ middle $ staticApp (defaultFileServerSettings $ fromString docroot)
{ ssIndices = if noindex then [] else mapMaybe (toPiece . pack) index { 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.