wai-app-file-cgi-0.1.1: File/CGI App of WAI

Network.Wai.Application.Classic.Types

Documentation

data AppSpec Source

Constructors

AppSpec 

Fields

softwareName :: ByteString

Name specified to Server: in HTTP response.

indexFile :: FilePath

A file name of an index file.

isHTML :: FilePath -> Bool

Whether this is an HTML or not.

logger :: Request -> Status -> RspBody -> IO ()

A function for logging.

data FileRoute Source

Constructors

FileRoute 

Fields

fileSrc :: ByteString

Path prefix to be matched to pathInfo.

fileDst :: FilePath

Path prefix to an actual file system.

data CgiRoute Source

Constructors

CgiRoute 

Fields

cgiSrc :: ByteString

Path prefix to be matched to pathInfo.

cgiDst :: FilePath

Path prefix to an actual file system.

data RspSpec Source

Constructors

RspSpec 

Fields

rspStatus :: Status

Response status.

rspHeaders :: ResponseHeaders

Response headers.

rspBody :: RspBody

Response body.

data RspBody Source

Constructors

NoBody

Body does not exist.

BodyLBS ByteString

Body as Lazy ByteString.

BodyFile FilePath Range

Body as a file.

data Range Source

Constructors

Entire Integer

Entire file showing its file size

Part Integer Integer

A part of a file taking offset and length