on master help sign in
updating doc.
commit7de30e6946e6d08521af6ea1e3926be584b5d07b authorKazu Yamamoto <kazu@iij.ad.jp> dateThu 31 Oct 2013, 15:45 (13 years ago) parent0869e82
1 file changed+17−8
warp/Network/Wai/Handler/Warp/Response.hs+17−8
warp/Network/Wai/Handler/Warp/Response.hs+17−8
@@ -35,14 +35,6 @@ import qualified System.PosixCompat.Files as P
3535
3636----------------------------------------------------------------
3737
38−-- If an application know the file size, it should be
39−-- specified using FilePart (Just).
40−-- If it is Nothing, disk access occurs to obtain its file size.
41−-- Content-Length and Content-Range (if necessary) are automatically
42−-- added into the HTTP response header.
43−-- If Content-Length and Content-Range exist in the HTTP response header,
44−-- they will cause consistency.
45−-- Status is also changed if necessary.
4638fileRange :: H.Status -> H.ResponseHeaders -> FilePath
4739 -> Maybe FilePart -> Maybe HeaderValue
4840 -> IO (Either SomeException
@@ -90,6 +82,23 @@ checkPartRange fileSize mPart mRange = checkPart mPart mRange
9082
9183----------------------------------------------------------------
9284
85+-- | Sending a HTTP response to 'Connection' according to 'Response'.
86+--
87+-- ['ResponseFile']
88+-- HTTP response body is sent by sendfile().
89+-- If an application know the file size, it should be
90+-- specified using FilePart (Just).
91+-- If it is Nothing, disk access occurs to obtain its file size.
92+-- Content-Length and Content-Range (if necessary) are automatically
93+-- added into the HTTP response header.
94+-- If Content-Length and Content-Range exist in the HTTP response header,
95+-- they will cause inconsistency.
96+-- Status is also changed to 206 if necessary.
97+--
98+-- ['ResponseBuilder'] TBD
99+--
100+-- ['ResponseSource'] TBD
101+
93102sendResponse :: Connection
94103 -> InternalInfo
95104 -> (forall a. IO a -> IO a) -- ^ Restore masking state.