@@ -42,6 +42,7 @@ import Data.Function (fix)
42import Control.Exception (throwIO)
42import Control.Exception (throwIO)
43import qualified System.IO as IO
43import qualified System.IO as IO
44import Data.ByteString.Lazy.Internal (defaultChunkSize)
44import Data.ByteString.Lazy.Internal (defaultChunkSize)
45+import Data.Word8 (_semicolon)
46data GzipSettings = GzipSettings
47data GzipSettings = GzipSettings
47 { gzipFiles :: GzipFiles
48 { gzipFiles :: GzipFiles
@@ -58,7 +59,7 @@ defaultCheckMime :: S.ByteString -> Bool
58defaultCheckMime bs =
59defaultCheckMime bs =
59 S8.isPrefixOf "text/" bs || bs' `Set.member` toCompress
60 S8.isPrefixOf "text/" bs || bs' `Set.member` toCompress
61− bs' = fst $ S.breakByte 59 bs -- semicolon
62+ bs' = fst $ S.break (== _semicolon) bs
62 toCompress = Set.fromList
63 toCompress = Set.fromList
63 [ "application/json"
64 [ "application/json"
64 , "application/javascript"
65 , "application/javascript"