X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FResource.hs;h=c8ca45d00579daff37db145dc98b217ab1f1a3d9;hb=32a6ebbb18856ab1203e8a114414f235c2abe22b;hp=0caf6ceb7dbf6479e8dfa4141609872f0381e945;hpb=0ff03469c29b791f2c609a659bbf59be97e306f2;p=Lucu.git diff --git a/Network/HTTP/Lucu/Resource.hs b/Network/HTTP/Lucu/Resource.hs index 0caf6ce..c8ca45d 100644 --- a/Network/HTTP/Lucu/Resource.hs +++ b/Network/HTTP/Lucu/Resource.hs @@ -652,7 +652,8 @@ input limit -- 成功。itr 内にチャンクを置いたままにする -- とメモリの無駄になるので除去。 chunk ← readItr itrReceivedBody seqToLBS itr - writeItr itrReceivedBody (∅) itr + writeItr itrReceivedBody (∅) itr + writeItr itrReceivedBodyLen 0 itr return chunk driftTo DecidingHeader @@ -715,7 +716,8 @@ inputChunk limit $ retry -- 成功 chunk ← readItr itrReceivedBody seqToLBS itr - writeItr itrReceivedBody (∅) itr + writeItr itrReceivedBody (∅) itr + writeItr itrReceivedBodyLen 0 itr return chunk when (Lazy.null chunk) $ driftTo DecidingHeader @@ -911,7 +913,7 @@ outputChunk wholeChunk unless (Lazy.null wholeChunk) $ liftIO $ atomically $ - writeItr itrBodyIsNull False itr + writeItr itrSentNoBody False itr where sendChunks ∷ Lazy.ByteString → Int → Resource () sendChunks str limit @@ -975,7 +977,7 @@ driftTo newState = postprocess itr drift itr _ Done - = do bodyIsNull ← readItr itrBodyIsNull id itr + = do bodyIsNull ← readItr itrSentNoBody id itr when bodyIsNull $ writeDefaultPage itr