wai-extra 2.1.1.1 → 2.1.1.2
raw patch · 2 files changed
+8/−11 lines, 2 filesdep ~basedep ~transformers
Dependency ranges changed: base, transformers
Files
Network/Wai/Middleware/RequestLogger.hs view
@@ -130,11 +130,10 @@ -- no black or white which are expected to be existing terminal colors. colors0 :: [Color] colors0 = [- Red - , Green - , Yellow - , Blue - , Magenta + Green+ , Yellow+ , Blue+ , Magenta , Cyan ] @@ -170,13 +169,11 @@ detailedMiddleware :: Callback -> Bool -> IO Middleware detailedMiddleware cb useColors = do getAddColor <-- if useColors- then do+ if not useColors then return (return return) else do icolors <- newIORef colors0 return $ do color <- liftIO $ atomicModifyIORef icolors rotateColors return $ ansiColor color- else return (return return) return $ detailedMiddleware' cb getAddColor ansiColor :: Color -> BS.ByteString -> [BS.ByteString]@@ -279,7 +276,7 @@ statusBS :: Response -> [BS.ByteString] statusBS rsp =- if status > 400 then ansiColor Red bs else [bs]+ if status >= 400 then ansiColor Red bs else [bs] where bs = pack $ show status status = statusCode $ responseStatus rsp
wai-extra.cabal view
@@ -1,5 +1,5 @@ Name: wai-extra-Version: 2.1.1.1+Version: 2.1.1.2 Synopsis: Provides some basic WAI handlers and middleware. Description: The goal here is to provide common features without many dependencies. License: MIT@@ -27,7 +27,7 @@ , time >= 1.1.4 , network >= 2.2.1.5 , directory >= 1.0.1- , transformers >= 0.2.2 && < 0.4+ , transformers >= 0.2.2 , blaze-builder >= 0.2.1.4 && < 0.4 , http-types >= 0.7 , text >= 0.7