@@ -43,7 +43,7 @@ fileRange :: H.Status -> H.ResponseHeaders -> FilePath
43 -> Maybe FilePart -> Maybe HeaderValue
43 -> Maybe FilePart -> Maybe HeaderValue
44 -> IO (Either SomeException
44 -> IO (Either SomeException
45 (H.Status, H.ResponseHeaders, Integer, Integer))
45 (H.Status, H.ResponseHeaders, Integer, Integer))
46−fileRange s0 hs0 path mPart mRange = liftIO . try $ do
46+fileRange s0 hs0 path mPart mRange = try $ do
47 fileSize <- checkFileSize mPart
47 fileSize <- checkFileSize mPart
48 let (beg, end, len, isEntire) = checkPartRange fileSize mPart mRange
48 let (beg, end, len, isEntire) = checkPartRange fileSize mPart mRange
49 let hs1 = addContentLength len hs0
49 let hs1 = addContentLength len hs0
@@ -147,12 +147,12 @@ sendResponse conn ii restore req reqidxhdr (ResponseFile s0 hs0 path mPart) =
147 mRange = reqidxhdr ! idxRange
147 mRange = reqidxhdr ! idxRange
149 sendResponseEither (Right (s, lengthyHeaders, beg, len))
149 sendResponseEither (Right (s, lengthyHeaders, beg, len))
150− | hasBody s req = liftIO $ do
150+ | hasBody s req = do
151 lheader <- composeHeader version s lengthyHeaders
151 lheader <- composeHeader version s lengthyHeaders
152 connSendFile conn path beg len (T.tickle th) [lheader]
152 connSendFile conn path beg len (T.tickle th) [lheader]
153 T.tickle th
153 T.tickle th
154 return isPersist
154 return isPersist
155− | otherwise = liftIO $ sendResponseNoBody conn th version s hs isPersist
155+ | otherwise = sendResponseNoBody conn th version s hs isPersist
157 version = httpVersion req
157 version = httpVersion req
158 (isPersist,_) = infoFromRequest req reqidxhdr
158 (isPersist,_) = infoFromRequest req reqidxhdr
@@ -188,7 +188,7 @@ sendResponse conn ii restore req reqidxhdr (ResponseBuilder s hs0 b)
189sendResponse conn ii restore req reqidxhdr (ResponseSource s hs0 withBodyFlush)
189sendResponse conn ii restore req reqidxhdr (ResponseSource s hs0 withBodyFlush)
190 | hasBody s req = withBodyFlush $ \bodyFlush -> restore $ do
190 | hasBody s req = withBodyFlush $ \bodyFlush -> restore $ do
191− header <- liftIO $ composeHeaderBuilder version s hs needsChunked
191+ header <- composeHeaderBuilder version s hs needsChunked
192 let src = CL.sourceList [header] `mappend` cbody bodyFlush
192 let src = CL.sourceList [header] `mappend` cbody bodyFlush
193 src $$ builderToByteString =$ connSink conn th
193 src $$ builderToByteString =$ connSink conn th
194 return isKeepAlive
194 return isKeepAlive