hack2-contrib-extra 2013.6.16 → 2013.6.22
raw patch · 3 files changed
+5/−4 lines, 3 filesdep ~airPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: air
API changes (from Hackage documentation)
Files
- hack2-contrib-extra.cabal +2/−2
- src/Hack2/Contrib/Middleware/UTF8Body.hs +2/−1
- src/Hack2/Contrib/RequestExtra.hs +1/−1
hack2-contrib-extra.cabal view
@@ -1,5 +1,5 @@ Name: hack2-contrib-extra-Version: 2013.6.16+Version: 2013.6.22 Build-type: Simple Synopsis: Hack2 contrib extra Description: Extra middlewares and utilities for Hack2@@ -28,7 +28,7 @@ , bytestring , data-default , time- , air+ , air >= 2013.6.22 , air-extra , hack2 , hack2-contrib
src/Hack2/Contrib/Middleware/UTF8Body.hs view
@@ -7,9 +7,10 @@ import Hack2 import qualified Data.ByteString.Char8 as B import Hack2.Contrib.Utils (as_string)+import Data.Maybe (fromMaybe) utf8_body :: Middleware utf8_body app = \env -> do r <- app env let raw_body = r.body- return r {body = raw_body.as_string (unescape_xml > u2b)}+ return r {body = raw_body.as_string (unescape_xml > fromMaybe def > u2b)}
src/Hack2/Contrib/RequestExtra.hs view
@@ -31,7 +31,7 @@ .drop 1 .map (split "=") .select (length > is 2)- .map tuple2+ .map (tuple2 > fromMaybe def) .map_fst (lower > B.pack) .map_snd (B.pack)