packages feed

yesod-core 1.1.0 → 1.1.0.1

raw patch · 2 files changed

+12/−5 lines, 2 files

Files

Yesod/Handler.hs view
@@ -150,7 +150,7 @@ import Network.Wai.Parse (parseHttpAccept)  import Yesod.Content-import Data.Maybe (fromMaybe)+import Data.Maybe (fromMaybe, mapMaybe) import Web.Cookie (SetCookie (..), renderSetCookie) import Control.Arrow ((***)) import qualified Network.Wai.Parse as NWP@@ -348,11 +348,18 @@           -> W.Request           -> ResourceT IO ([(Text, Text)], [(Text, FileInfo)]) rbHelper' backend mkFI req =-    (map fix1 *** map fix2) <$> (NWP.parseRequestBody backend req)+    (map fix1 *** mapMaybe fix2) <$> (NWP.parseRequestBody backend req)   where     fix1 = go *** go-    fix2 (x, NWP.FileInfo a b c) =-        (go x, mkFI (go a) (go b) c)+    fix2 (x, NWP.FileInfo a' b c)+        | S.null a = Nothing+        | otherwise = Just (go x, mkFI (go a) (go b) c)+      where+        a+            | S.length a' < 2 = a'+            | S8.head a' == '"' && S8.last a' == '"' = S.tail $ S.init a'+            | S8.head a' == '\'' && S8.last a' == '\'' = S.tail $ S.init a'+            | otherwise = a'     go = decodeUtf8With lenientDecode  -- | Get the sub application argument.
yesod-core.cabal view
@@ -1,5 +1,5 @@ name:            yesod-core-version:         1.1.0+version:         1.1.0.1 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>