Safe Haskell | None |
---|---|
Language | Haskell98 |
Backend for Common Gateway Interface. Almost all users should use the
run
function.
- run :: Application -> IO ()
- runSendfile :: ByteString -> Application -> IO ()
- runGeneric :: [(String, String)] -> (Int -> IO (IO ByteString)) -> (ByteString -> IO ()) -> Maybe ByteString -> Application -> IO ()
- requestBodyFunc :: (Int -> IO (Maybe ByteString)) -> Int -> IO (IO ByteString)
Documentation
run :: Application -> IO () Source
Run an application using CGI.
:: ByteString | sendfile header |
-> Application | |
-> IO () |
Some web servers provide an optimization for sending files via a sendfile system call via a special header. To use this feature, provide that header name here.
:: [(String, String)] | all variables |
-> (Int -> IO (IO ByteString)) | responseBody of input |
-> (ByteString -> IO ()) | destination for output |
-> Maybe ByteString | does the server support the X-Sendfile header? |
-> Application | |
-> IO () |
A generic CGI helper, which allows other backends (FastCGI and SCGI) to
use the same code as CGI. Most users will not need this function, and can
stick with run
or runSendfile
.
requestBodyFunc :: (Int -> IO (Maybe ByteString)) -> Int -> IO (IO ByteString) Source