X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FInteraction.hs;h=ac5c1d6285aa33d936d4ae23135cb09b4ef8e125;hp=58215792fd968846532b6e7f27c065c4f874203e;hb=ea2b7838f1b3d9d4923a220a601be2e04cc559d7;hpb=17020e406a20cbef8ec17594868db559c4c5a5db diff --git a/Network/HTTP/Lucu/Interaction.hs b/Network/HTTP/Lucu/Interaction.hs index 5821579..ac5c1d6 100644 --- a/Network/HTTP/Lucu/Interaction.hs +++ b/Network/HTTP/Lucu/Interaction.hs @@ -41,7 +41,7 @@ data Interaction = Interaction { , itrExpectedContinue ∷ !(Maybe Bool) , itrReqBodyLength ∷ !(Maybe RequestBodyLength) - , itrReqBodyWanted ∷ !(TVar (Maybe Int)) + , itrReqBodyWanted ∷ !(TVar Int) , itrReqBodyWasteAll ∷ !(TVar Bool) , itrReqChunkIsOver ∷ !(TVar Bool) , itrReceivedBody ∷ !(TVar (Seq BS.ByteString)) @@ -88,9 +88,9 @@ newInteraction conf@(Config {..}) port addr cert request , resHeaders = singleton "Content-Type" defaultPageContentType } - reqBodyWanted ← newTVarIO Nothing -- Resource が要求してゐるチャンク長 - reqBodyWasteAll ← newTVarIO False -- 殘りの body を讀み捨てよと云ふ要求 - reqChunkIsOver ← newTVarIO False -- 最後のチャンクを讀み終へた + reqBodyWanted ← newTVarIO 0 + reqBodyWasteAll ← newTVarIO False + reqChunkIsOver ← newTVarIO False receivedBody ← newTVarIO S.empty receivedBodyLen ← newTVarIO 0