X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FInteraction.hs;h=3ecc9126f4292a63a239db5a0efb246f76909402;hb=895341e;hp=58215792fd968846532b6e7f27c065c4f874203e;hpb=ca338174155913a969808d7b20193973394e474e;p=Lucu.git diff --git a/Network/HTTP/Lucu/Interaction.hs b/Network/HTTP/Lucu/Interaction.hs index 5821579..3ecc912 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,16 +88,16 @@ 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 response ← newTVarIO res willChunkBody ← newTVarIO False - willDiscardBody ← newTVarIO False - willClose ← newTVarIO False + willDiscardBody ← newTVarIO (arWillDiscardBody ar) + willClose ← newTVarIO (arWillClose ar) bodyToSend ← newEmptyTMVarIO sentNoBodySoFar ← newTVarIO True