wai-extra-3.1.8: Provides some basic WAI handlers and middleware.
Safe HaskellNone
LanguageHaskell2010

Network.Wai.Handler.CGI

Description

Backend for Common Gateway Interface. Almost all users should use the run function.

Synopsis

Documentation

run :: Application -> IO () Source #

Run an application using CGI.

runSendfile Source #

Arguments

:: 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.

runGeneric Source #

Arguments

:: [(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.