-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Provides some basic WAI handlers and middleware.
--   
--   Provides basic WAI handler and middleware functionality:
--   
--   <ul>
--   <li>WAI Testing Framework</li>
--   </ul>
--   
--   Hspec testing facilities and helpers for WAI.
--   
--   <ul>
--   <li>Event Source/Event Stream</li>
--   </ul>
--   
--   Send server events to the client. Compatible with the JavaScript
--   EventSource API.
--   
--   <ul>
--   <li>Accept Override</li>
--   </ul>
--   
--   Override the Accept header in a request. Special handling for the
--   _accept query parameter (which is used throughout WAI override the
--   Accept header).
--   
--   <ul>
--   <li>Add Headers</li>
--   </ul>
--   
--   WAI Middleware for adding arbitrary headers to an HTTP request.
--   
--   <ul>
--   <li>Clean Path</li>
--   </ul>
--   
--   Clean a request path to a canonical form.
--   
--   <ul>
--   <li>GZip Compression</li>
--   </ul>
--   
--   Negotiate HTTP payload gzip compression.
--   
--   <ul>
--   <li>HTTP Basic Authentication</li>
--   </ul>
--   
--   WAI Basic Authentication Middleware which uses Authorization header.
--   
--   <ul>
--   <li>JSONP</li>
--   </ul>
--   
--   "JSON with Padding" middleware. Automatic wrapping of JSON responses
--   to convert into JSONP.
--   
--   <ul>
--   <li>Method Override / Post</li>
--   </ul>
--   
--   Allows overriding of the HTTP request method via the _method query
--   string parameter.
--   
--   <ul>
--   <li>Request Logging</li>
--   </ul>
--   
--   Request logging middleware for development and production environments
--   
--   <ul>
--   <li>Request Rewrite</li>
--   </ul>
--   
--   Rewrite request path info based on a custom conversion rules.
--   
--   <ul>
--   <li>Stream Files</li>
--   </ul>
--   
--   Convert ResponseFile type responses into ResponseStream type.
--   
--   <ul>
--   <li>Virtual Host</li>
--   </ul>
--   
--   Redirect incoming requests to a new host based on custom rules.
--   
--   API docs and the README are available at
--   <a>http://www.stackage.org/package/wai-extra</a>.
@package wai-extra
@version 3.0.13.1


-- | Internal module, usually you don't need to use it.
module Network.Wai.EventSource.EventStream

-- | Type representing a communication over an event stream. This can be an
--   actual event, a comment, a modification to the retry timer, or a
--   special "close" event indicating the server should close the
--   connection.
data ServerEvent
ServerEvent :: Maybe Builder -> Maybe Builder -> [Builder] -> ServerEvent
[eventName] :: ServerEvent -> Maybe Builder
[eventId] :: ServerEvent -> Maybe Builder
[eventData] :: ServerEvent -> [Builder]
CommentEvent :: Builder -> ServerEvent
[eventComment] :: ServerEvent -> Builder
RetryEvent :: Int -> ServerEvent
[eventRetry] :: ServerEvent -> Int
CloseEvent :: ServerEvent

-- | Converts a <a>ServerEvent</a> to its wire representation as specified
--   by the <tt>text/event-stream</tt> content type.
eventToBuilder :: ServerEvent -> Maybe Builder


-- | A WAI adapter to the HTML5 Server-Sent Events API.
module Network.Wai.EventSource

-- | Type representing a communication over an event stream. This can be an
--   actual event, a comment, a modification to the retry timer, or a
--   special "close" event indicating the server should close the
--   connection.
data ServerEvent
ServerEvent :: Maybe Builder -> Maybe Builder -> [Builder] -> ServerEvent
[eventName] :: ServerEvent -> Maybe Builder
[eventId] :: ServerEvent -> Maybe Builder
[eventData] :: ServerEvent -> [Builder]
CommentEvent :: Builder -> ServerEvent
[eventComment] :: ServerEvent -> Builder
RetryEvent :: Int -> ServerEvent
[eventRetry] :: ServerEvent -> Int
CloseEvent :: ServerEvent

-- | Make a new WAI EventSource application reading events from the given
--   channel.
eventSourceAppChan :: Chan ServerEvent -> Application

-- | Make a new WAI EventSource application reading events from the given
--   IO action.
eventSourceAppIO :: IO ServerEvent -> Application

module Network.Wai.Test
type Session = ReaderT Application (StateT ClientState IO)
runSession :: Session a -> Application -> IO a

-- | Since 3.0.6
type ClientCookies = Map ByteString SetCookie

-- | Since 3.0.6
getClientCookies :: Session ClientCookies

-- | Since 3.0.6
modifyClientCookies :: (ClientCookies -> ClientCookies) -> Session ()

-- | Since 3.0.6
setClientCookie :: SetCookie -> Session ()

-- | Since 3.0.6
deleteClientCookie :: ByteString -> Session ()
request :: Request -> Session SResponse
srequest :: SRequest -> Session SResponse
data SRequest
SRequest :: Request -> ByteString -> SRequest
[simpleRequest] :: SRequest -> Request
[simpleRequestBody] :: SRequest -> ByteString
data SResponse
SResponse :: Status -> ResponseHeaders -> ByteString -> SResponse
[simpleStatus] :: SResponse -> Status
[simpleHeaders] :: SResponse -> ResponseHeaders
[simpleBody] :: SResponse -> ByteString

-- | A default, blank request.
--   
--   Since 2.0.0
defaultRequest :: Request

-- | Set whole path (request path + query string).
setPath :: Request -> ByteString -> Request
setRawPathInfo :: Request -> ByteString -> Request
assertStatus :: Int -> SResponse -> Session ()
assertContentType :: ByteString -> SResponse -> Session ()
assertBody :: ByteString -> SResponse -> Session ()
assertBodyContains :: ByteString -> SResponse -> Session ()
assertHeader :: CI ByteString -> ByteString -> SResponse -> Session ()
assertNoHeader :: CI ByteString -> SResponse -> Session ()

-- | Since 3.0.6
assertClientCookieExists :: String -> ByteString -> Session ()

-- | Since 3.0.6
assertNoClientCookieExists :: String -> ByteString -> Session ()

-- | Since 3.0.6
assertClientCookieValue :: String -> ByteString -> ByteString -> Session ()
data WaiTestFailure
WaiTestFailure :: String -> WaiTestFailure
instance GHC.Classes.Eq Network.Wai.Test.WaiTestFailure
instance GHC.Show.Show Network.Wai.Test.WaiTestFailure
instance GHC.Classes.Eq Network.Wai.Test.SResponse
instance GHC.Show.Show Network.Wai.Test.SResponse
instance GHC.Exception.Exception Network.Wai.Test.WaiTestFailure


-- | This module gives you a way to mount applications under sub-URIs. For
--   example:
--   
--   <pre>
--   bugsApp, helpdeskApp, apiV1, apiV2, mainApp :: Application
--   
--   myApp :: Application
--   myApp = mapUrls $
--         mount "bugs"     bugsApp
--     &lt;|&gt; mount "helpdesk" helpdeskApp
--     &lt;|&gt; mount "api"
--             (   mount "v1" apiV1
--             &lt;|&gt; mount "v2" apiV2
--             )
--     &lt;|&gt; mountRoot mainApp
--   </pre>
module Network.Wai.UrlMap
data UrlMap' a
type UrlMap = UrlMap' Application

-- | Mount an application under a given path. The ToApplication typeclass
--   gives you the option to pass either an <a>Application</a> or an
--   <a>UrlMap</a> as the second argument.
mount' :: ToApplication a => Path -> a -> UrlMap

-- | A convenience function like mount', but for mounting things under a
--   single path segment.
mount :: ToApplication a => Text -> a -> UrlMap

-- | Mount something at the root. Use this for the last application in the
--   block, to avoid 500 errors from none of the applications matching.
mountRoot :: ToApplication a => a -> UrlMap
mapUrls :: UrlMap -> Application
instance GHC.Base.Functor Network.Wai.UrlMap.UrlMap'
instance GHC.Base.Applicative Network.Wai.UrlMap.UrlMap'
instance GHC.Base.Alternative Network.Wai.UrlMap.UrlMap'
instance Network.Wai.UrlMap.ToApplication Network.Wai.Application
instance Network.Wai.UrlMap.ToApplication Network.Wai.UrlMap.UrlMap


-- | Since 3.0.9
module Network.Wai.Middleware.Routed

-- | Apply a middleware based on a test of pathInfo
--   
--   example:
--   
--   <pre>
--   let corsify = routedMiddleWare ("static" `elem`) addCorsHeaders
--   </pre>
--   
--   Since 3.0.9
routedMiddleware :: ([Text] -> Bool) -> Middleware -> Middleware

-- | Only apply the middleware to certain hosts
--   
--   Since 3.0.9
hostedMiddleware :: ByteString -> Middleware -> Middleware


-- | Since 3.0.4
module Network.Wai.Middleware.StreamFile

-- | Convert ResponseFile type responses into ResponseStream type
--   
--   Checks the response type, and if it's a ResponseFile, converts it into
--   a ResponseStream. Other response types are passed through unchanged.
--   
--   Converted responses get a Content-Length header.
--   
--   Streaming a file will bypass a sendfile system call, and may be useful
--   to work around systems without working sendfile implementations.
--   
--   Since 3.0.4
streamFile :: Middleware


-- | Implements HTTP Basic Authentication.
--   
--   This module may add digest authentication in the future.
module Network.Wai.Middleware.HttpAuth

-- | Perform basic authentication.
--   
--   <pre>
--   basicAuth (\u p -&gt; return $ u == "michael" &amp;&amp; p == "mypass") "My Realm"
--   </pre>
--   
--   Since 1.3.4
basicAuth :: CheckCreds -> AuthSettings -> Middleware

-- | Check if a given username and password is valid.
type CheckCreds = ByteString -> ByteString -> IO Bool

-- | Basic authentication settings. This value is an instance of
--   <tt>IsString</tt>, so the recommended approach to create a value is to
--   provide a string literal (which will be the realm) and then overriding
--   individual fields.
--   
--   <pre>
--   "My Realm" { authIsProtected = someFunc } :: AuthSettings
--   </pre>
--   
--   Since 1.3.4
data AuthSettings

-- | Since 1.3.4
authRealm :: AuthSettings -> ByteString

-- | Takes the realm and returns an appropriate 401 response when
--   authentication is not provided.
--   
--   Since 1.3.4
authOnNoAuth :: AuthSettings -> (ByteString -> Application)

-- | Determine if access to the requested resource is restricted.
--   
--   Default: always returns <tt>True</tt>.
--   
--   Since 1.3.4
authIsProtected :: AuthSettings -> (Request -> IO Bool)

-- | Extract basic authentication data from usually <b>Authorization</b>
--   header value. Returns username and password
--   
--   Since 3.0.5
extractBasicAuth :: ByteString -> Maybe (ByteString, ByteString)

-- | Extract bearer authentication data from <b>Authorization</b> header
--   value. Returns bearer token
--   
--   Since 3.0.5
extractBearerAuth :: ByteString -> Maybe ByteString
instance Data.String.IsString Network.Wai.Middleware.HttpAuth.AuthSettings

module Network.Wai.Middleware.Vhost
vhost :: [(Request -> Bool, Application)] -> Application -> Application
redirectWWW :: Text -> Application -> Application
redirectTo :: ByteString -> Response
redirectToLogged :: (Text -> IO ()) -> ByteString -> IO Response

module Network.Wai.Middleware.StripHeaders
stripHeader :: ByteString -> (Response -> Response)
stripHeaders :: [ByteString] -> (Response -> Response)

-- | If the request satisifes the provided predicate, strip headers
--   matching the provided header name.
--   
--   Since 3.0.8
stripHeaderIf :: ByteString -> (Request -> Bool) -> Middleware

-- | If the request satisifes the provided predicate, strip all headers
--   whose header name is in the list of provided header names.
--   
--   Since 3.0.8
stripHeadersIf :: [ByteString] -> (Request -> Bool) -> Middleware

module Network.Wai.Middleware.Rewrite

-- | rewrite based on your own conversion rules
rewrite :: ([Text] -> RequestHeaders -> IO [Text]) -> Middleware

-- | rewrite based on your own conversion rules Example convert function:
rewritePure :: ([Text] -> RequestHeaders -> [Text]) -> Middleware


-- | Changes the request-method via first post-parameter _method.
module Network.Wai.Middleware.MethodOverridePost

-- | Allows overriding of the HTTP request method via the _method post
--   string parameter.
--   
--   <ul>
--   <li>Looks for the Content-Type requestHeader.</li>
--   <li>If the header is set to application/x-www-form-urlencoded and the
--   first POST parameter is _method then it changes the request-method to
--   the value of that parameter.</li>
--   <li>This middleware only applies when the initial request method is
--   POST.</li>
--   </ul>
methodOverridePost :: Middleware

module Network.Wai.Middleware.MethodOverride

-- | Allows overriding of the HTTP request method via the _method query
--   string parameter.
--   
--   This middleware only applies when the initial request method is POST.
--   This allow submitting of normal HTML forms, without worries of
--   semantics mismatches in the HTTP spec.
methodOverride :: Middleware


-- | Automatic wrapping of JSON responses to convert into JSONP.
module Network.Wai.Middleware.Jsonp

-- | Wrap json responses in a jsonp callback.
--   
--   Basically, if the user requested a "text/javascript" and supplied a
--   "callback" GET parameter, ask the application for an
--   "application/json" response, then convert that into a JSONP response,
--   having a content type of "text/javascript" and calling the specified
--   callback function.
jsonp :: Middleware


-- | Some helpers for parsing data out of a raw WAI <a>Request</a>.
module Network.Wai.Parse

-- | Parse the HTTP accept string to determine supported content types.
parseHttpAccept :: ByteString -> [ByteString]
parseRequestBody :: BackEnd y -> Request -> IO ([Param], [File y])
data RequestBodyType
UrlEncoded :: RequestBodyType
Multipart :: ByteString -> RequestBodyType
getRequestBodyType :: Request -> Maybe RequestBodyType
sinkRequestBody :: BackEnd y -> RequestBodyType -> IO ByteString -> IO ([Param], [File y])

-- | A file uploading backend. Takes the parameter name, file name, and a
--   stream of data.
type BackEnd a = ByteString  parameter name -> FileInfo () -> IO ByteString -> IO a

-- | Store uploaded files in memory
lbsBackEnd :: Monad m => ignored1 -> ignored2 -> m ByteString -> m ByteString

-- | Save uploaded files on disk as temporary files
--   
--   Note: starting with version 2.0, removal of temp files is registered
--   with the provided <tt>InternalState</tt>. It is the responsibility of
--   the caller to ensure that this <tt>InternalState</tt> gets cleaned up.
tempFileBackEnd :: InternalState -> ignored1 -> ignored2 -> IO ByteString -> IO FilePath

-- | Same as <tt>tempFileSink</tt>, but use configurable temp folders and
--   patterns.
tempFileBackEndOpts :: IO FilePath -> String -> InternalState -> ignored1 -> ignored2 -> IO ByteString -> IO FilePath

-- | Post parameter name and value.
type Param = (ByteString, ByteString)

-- | Post parameter name and associated file information.
type File y = (ByteString, FileInfo y)

-- | Information on an uploaded file.
data FileInfo c
FileInfo :: ByteString -> ByteString -> c -> FileInfo c
[fileName] :: FileInfo c -> ByteString
[fileContentType] :: FileInfo c -> ByteString
[fileContent] :: FileInfo c -> c

-- | Parse a content type value, turning a single <tt>ByteString</tt> into
--   the actual content type and a list of pairs of attributes.
--   
--   Since 1.3.2
parseContentType :: ByteString -> (ByteString, [(ByteString, ByteString)])
instance GHC.Show.Show Network.Wai.Parse.Bound
instance GHC.Classes.Eq Network.Wai.Parse.Bound
instance GHC.Show.Show c => GHC.Show.Show (Network.Wai.Parse.FileInfo c)
instance GHC.Classes.Eq c => GHC.Classes.Eq (Network.Wai.Parse.FileInfo c)


-- | Only allow local connections.
module Network.Wai.Middleware.Local

-- | This middleware rejects non-local connections with a specific
--   response. It is useful when supporting web-based local applications,
--   which would typically want to reject external connections.
local :: Response -> Middleware

module Network.Wai.Middleware.CleanPath
cleanPath :: ([Text] -> Either ByteString [Text]) -> ByteString -> ([Text] -> Application) -> Application


-- | Automatically produce responses to HEAD requests based on the
--   underlying applications GET response.
module Network.Wai.Middleware.Autohead
autohead :: Middleware


-- | Some helpers for interrogating a WAI <a>Request</a>.
module Network.Wai.Request

-- | Does this request appear to have been made over an SSL connection?
--   
--   This function first checks <tt><a>isSecure</a></tt>, but also checks
--   for headers that may indicate a secure connection even in the presence
--   of reverse proxies.
--   
--   Note: these headers can be easily spoofed, so decisions which require
--   a true SSL connection (i.e. sending sensitive information) should only
--   use <tt><a>isSecure</a></tt>. This is not always the case though: for
--   example, deciding to force a non-SSL request to SSL by redirect. One
--   can safely choose not to redirect when the request <i>appears</i>
--   secure, even if it's actually not.
--   
--   Since 3.0.7
appearsSecure :: Request -> Bool

-- | Guess the "application root" based on the given request.
--   
--   The application root is the basis for forming URLs pointing at the
--   current application. For more information and relevant caveats, please
--   see <a>Network.Wai.Middleware.Approot</a>.
--   
--   Since 3.0.7
guessApproot :: Request -> ByteString


-- | Redirect non-SSL requests to https
--   
--   Since 3.0.7
module Network.Wai.Middleware.ForceSSL

-- | For requests that don't appear secure, redirect to https
--   
--   Since 3.0.7
forceSSL :: Middleware


-- | Middleware for establishing the root of the application.
--   
--   Many application need the ability to create URLs referring back to the
--   application itself. For example: generate RSS feeds or sitemaps,
--   giving users copy-paste links, or sending emails. In many cases, the
--   approot can be determined correctly from the request headers. However,
--   some things can prevent this, especially reverse proxies. This module
--   provides multiple ways of configuring approot discovery, and functions
--   for applications to get that approot.
--   
--   Approots are structured such that they can be prepended to a string
--   such as <tt><i>foo</i>bar?baz=bin</tt>. For example, if your
--   application is hosted on example.com using HTTPS, the approot would be
--   <tt><a>https://example.com</a></tt>. Note the lack of a trailing
--   slash.
module Network.Wai.Middleware.Approot

-- | The most generic version of the middleware, allowing you to provide a
--   function to get the approot for each request. For many use cases, one
--   of the helper functions provided by this module will give the
--   necessary functionality more conveniently.
--   
--   Since 3.0.7
approotMiddleware :: (Request -> IO ByteString) -> Middleware

-- | Same as <tt><a>envFallbackNamed</a> <a>APPROOT</a></tt>.
--   
--   The environment variable <tt>APPROOT</tt> is used by Keter, School of
--   Haskell, and yesod-devel.
--   
--   Since 3.0.7
envFallback :: IO Middleware

-- | Produce a middleware that takes the approot from the given environment
--   variable, falling back to the behavior of <a>fromRequest</a> if the
--   variable is not set.
--   
--   Since 3.0.7
envFallbackNamed :: String -> IO Middleware

-- | Hard-code the given value as the approot.
--   
--   Since 3.0.7
hardcoded :: ByteString -> Middleware

-- | Get the approot by analyzing the request. This is not a full-proof
--   approach, but in many common cases will work. Situations that can
--   break this are:
--   
--   <ul>
--   <li>Requests which spoof headers and imply the connection is over
--   HTTPS</li>
--   <li>Reverse proxies that change ports in surprising ways</li>
--   <li>Invalid Host headers</li>
--   <li>Reverse proxies which modify the path info</li>
--   </ul>
--   
--   Normally trusting headers in this way is insecure, however in the case
--   of approot, the worst that can happen is that the client will get an
--   incorrect URL. If you are relying on the approot for some
--   security-sensitive purpose, it is highly recommended to use
--   <tt>hardcoded</tt>, which cannot be spoofed.
--   
--   Since 3.0.7
fromRequest :: Middleware

-- | Get the approot set by the middleware. If the middleware is not in
--   use, then this function will return an exception. For a total version
--   of the function, see <a>getApprootMay</a>.
--   
--   Since 3.0.7
getApproot :: Request -> ByteString

-- | A total version of <a>getApproot</a>, which returns <a>Nothing</a> if
--   the middleware is not in use.
--   
--   Since 3.0.7
getApprootMay :: Request -> Maybe ByteString
instance GHC.Show.Show Network.Wai.Middleware.Approot.ApprootMiddlewareNotSetup
instance GHC.Exception.Exception Network.Wai.Middleware.Approot.ApprootMiddlewareNotSetup


-- | Since 3.0.3
module Network.Wai.Middleware.AddHeaders

-- | Prepend a list of headers without any checks
--   
--   Since 3.0.3
addHeaders :: [(ByteString, ByteString)] -> Middleware

module Network.Wai.Middleware.AcceptOverride
acceptOverride :: Middleware


-- | Some helpers for dealing with WAI <a>Header</a>s.
module Network.Wai.Header

-- | More useful for a response. A Wai Request already has a
--   requestBodyLength
contentLength :: [(HeaderName, ByteString)] -> Maybe Integer

module Network.Wai.Middleware.RequestLogger

-- | Production request logger middleware.
logStdout :: Middleware

-- | Development request logger middleware.
--   
--   Flushes <a>stdout</a> on each request, which would be inefficient in
--   production use. Use "logStdout" in production.
logStdoutDev :: Middleware
mkRequestLogger :: RequestLoggerSettings -> IO Middleware

-- | <tt>RequestLoggerSettings</tt> is an instance of Default. See
--   <a>Data.Default</a> for more information.
--   
--   <tt>outputFormat</tt>, <tt>autoFlush</tt>, and <tt>destination</tt>
--   are record fields for the record type <tt>RequestLoggerSettings</tt>,
--   so they can be used to modify settings values using record syntax.
data RequestLoggerSettings

-- | Default value: <tt>Detailed</tt> <tt>True</tt>.
outputFormat :: RequestLoggerSettings -> OutputFormat

-- | Only applies when using the <tt>Handle</tt> constructor for
--   <tt>destination</tt>.
--   
--   Default value: <tt>True</tt>.
autoFlush :: RequestLoggerSettings -> Bool

-- | Default: <tt>Handle</tt> <tt>stdout</tt>.
destination :: RequestLoggerSettings -> Destination
data OutputFormat
Apache :: IPAddrSource -> OutputFormat

-- | use colors?
Detailed :: Bool -> OutputFormat
CustomOutputFormat :: OutputFormatter -> OutputFormat
CustomOutputFormatWithDetails :: OutputFormatterWithDetails -> OutputFormat
type OutputFormatter = ZonedDate -> Request -> Status -> Maybe Integer -> LogStr
type OutputFormatterWithDetails = ZonedDate -> Request -> Status -> Maybe Integer -> NominalDiffTime -> [ByteString] -> Builder -> LogStr
data Destination
Handle :: Handle -> Destination
Logger :: LoggerSet -> Destination
Callback :: Callback -> Destination
type Callback = LogStr -> IO ()

-- | Source from which the IP source address of the client is obtained.
data IPAddrSource :: *

-- | From the peer address of the HTTP connection.
FromSocket :: IPAddrSource

-- | From X-Real-IP: or X-Forwarded-For: in the HTTP header.
FromHeader :: IPAddrSource

-- | From the peer address if header is not found.
FromFallback :: IPAddrSource
instance Data.Default.Class.Default Network.Wai.Middleware.RequestLogger.RequestLoggerSettings

module Network.Wai.Middleware.RequestLogger.JSON
formatAsJSON :: OutputFormatterWithDetails


-- | Automatic gzip compression of responses.
module Network.Wai.Middleware.Gzip

-- | Use gzip to compress the body of the response.
--   
--   Analyzes the "Accept-Encoding" header from the client to determine if
--   gzip is supported.
--   
--   Possible future enhancements:
--   
--   <ul>
--   <li>Only compress if the response is above a certain size.</li>
--   </ul>
gzip :: GzipSettings -> Middleware
data GzipSettings
gzipFiles :: GzipSettings -> GzipFiles
data GzipFiles
GzipIgnore :: GzipFiles
GzipCompress :: GzipFiles
GzipCacheFolder :: FilePath -> GzipFiles
gzipCheckMime :: GzipSettings -> ByteString -> Bool

-- | The default value for this type.
def :: Default a => a
defaultCheckMime :: ByteString -> Bool
instance GHC.Read.Read Network.Wai.Middleware.Gzip.GzipFiles
instance GHC.Classes.Eq Network.Wai.Middleware.Gzip.GzipFiles
instance GHC.Show.Show Network.Wai.Middleware.Gzip.GzipFiles
instance Data.Default.Class.Default Network.Wai.Middleware.Gzip.GzipSettings


-- | Backend for Common Gateway Interface. Almost all users should use the
--   <a>run</a> function.
module Network.Wai.Handler.CGI

-- | Run an application using CGI.
run :: 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.
runSendfile :: ByteString -> 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 <a>run</a> or <a>runSendfile</a>.
runGeneric :: [(String, String)] -> (Int -> IO (IO ByteString)) -> (ByteString -> IO ()) -> Maybe ByteString -> Application -> IO ()
requestBodyFunc :: (Int -> IO (Maybe ByteString)) -> Int -> IO (IO ByteString)

module Network.Wai.Handler.SCGI
run :: Application -> IO ()
runSendfile :: ByteString -> Application -> IO ()
