import Data.Proxy
import Data.Tagged
import Data.Text (Text)
-import qualified Data.Text as T
import Data.Time
import Data.Time.Format.HTTP
import Network.HTTP.Lucu.Abortion
else
abort $ mkAbortion' RequestEntityTooLarge
$ "Request body must be smaller than "
- ⊕ T.pack (show limit)
+ ⊕ cs (show limit)
⊕ " bytes."
go !n !b = do c ← getChunk $ min n BB.defaultBufferSize
if Strict.null c then
$ "Malformed boundary: " ⊕ boundary
case parseMultipartFormData b src of
Right xs → return $ map (first cs) xs
- Left err → abort $ mkAbortion' BadRequest $ T.pack err
+ Left err → abort $ mkAbortion' BadRequest $ cs err
-- |@'redirect' code uri@ declares the response status as @code@ and
-- \"Location\" header field as @uri@. The @code@ must satisfy