wai-extra-1.3.0.3: Provides some basic WAI handlers and middleware.

Safe HaskellNone

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.

runSendfileSource

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.

runGenericSource

Arguments

:: [(String, String)]

all variables

-> (Int -> Source (ResourceT 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.