X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FResource%2FInternal.hs;h=b13d3a9f14062e76b3090086cf992f98aae03f4c;hb=742b0cae221f12eafbf1379b91c473b059efa7d8;hp=9feca7edf6e3b6401fc7e4306705a420553fe016;hpb=6680828c79aff38431704075c339e043b577589e;p=Lucu.git diff --git a/Network/HTTP/Lucu/Resource/Internal.hs b/Network/HTTP/Lucu/Resource/Internal.hs index 9feca7e..b13d3a9 100644 --- a/Network/HTTP/Lucu/Resource/Internal.hs +++ b/Network/HTTP/Lucu/Resource/Internal.hs @@ -47,11 +47,11 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Collections import Data.Convertible.Base +import Data.Convertible.Instances.Text () import Data.List (intersperse, nub) import Data.Maybe import Data.Monoid import Data.Monoid.Unicode -import qualified Data.Text as T import Network.HTTP.Lucu.Abortion import Network.HTTP.Lucu.Abortion.Internal import Network.HTTP.Lucu.Config @@ -202,7 +202,7 @@ spawnRsrc (Resource {..}) ni@(NI {..}) toAbortion e = case fromException e of Just abortion → abortion - Nothing → mkAbortion' InternalServerError $ T.pack $ show e + Nothing → mkAbortion' InternalServerError $ cs $ show e processException ∷ SomeException → IO () processException exc @@ -302,7 +302,7 @@ getChunk' n | n < 0 = fail ("getChunk: n must not be negative: " ⧺ show n) | n ≡ 0 = return (∅) | otherwise = do req ← getRequest - if reqMustHaveBody req then + if reqHasBody req then askForInput =≪ getInteraction else driftTo DecidingHeader *> return (∅)