packages feed

rest-wai 0.1.0.6 → 0.1.0.7

raw patch · 3 files changed

+17/−9 lines, 3 filesdep ~rest-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: rest-core

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +#### 0.1.0.7++* Make header comparison case-insensitive.++* Bump `rest-core` upper bound.+ #### 0.1.0.6  * Remove unneeded dependency on utf8-string.
rest-wai.cabal view
@@ -1,5 +1,5 @@ name:                rest-wai-version:             0.1.0.6+version:             0.1.0.7 description:         Rest driver for WAI applications. synopsis:            Rest driver for WAI applications. maintainer:          code@silk.co@@ -29,7 +29,7 @@     , http-types == 0.8.*     , mime-types == 0.1.*     , mtl >= 2.0 && < 2.3-    , rest-core == 0.34.*+    , rest-core >= 0.34 && < 0.36     , text >= 0.11 && < 1.3     , unordered-containers == 0.2.*     , wai >= 2.1 && < 3.1
src/Rest/Driver/Wai.hs view
@@ -1,5 +1,10 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, OverloadedStrings, RankNTypes #-}+{-# LANGUAGE+    CPP+  , GeneralizedNewtypeDeriving+  , OverloadedStrings+  , RankNTypes+  #-} module Rest.Driver.Wai (apiToApplication) where  import Control.Applicative@@ -8,7 +13,6 @@ import Network.HTTP.Types.Status (status200) import Network.Mime (defaultMimeMap) import Network.Wai- import qualified Data.ByteString.Char8 as Char8 import qualified Data.ByteString.Lazy  as Lazy import qualified Data.CaseInsensitive  as CI@@ -17,11 +21,10 @@ import qualified Data.Text             as Text  import Rest.Api (Api)+import Rest.Driver.RestM (RestInput (..), RestOutput (..), runRestM) import Rest.Driver.Types (Run)-import Rest.Driver.RestM (RestInput(..), RestOutput(..), runRestM)--import qualified Rest.Run          as Rest import qualified Rest.Driver.Types as Rest+import qualified Rest.Run          as Rest  apiToApplication :: Run m IO -> Api m -> Application apiToApplication run api req =@@ -41,7 +44,7 @@   do bs <- lazyRequestBody req      return $ RestInput        { headers    = HashMap.fromList-                    . map (string . CI.original *** string)+                    . map (CI.mk . string . CI.original *** string)                     . requestHeaders                     $ req @@ -73,4 +76,3 @@   responseLBS (maybe status200 toEnum rc)               ((CI.mk . Char8.pack *** Char8.pack) <$> HashMap.toList hs)               bs-