gitit-0.12.3.1: Wiki using happstack, git or darcs, and pandoc.

Safe Haskell | None
Language | Haskell98

Network.Gitit.Server

Synopsis

- module Happstack.Server
- withExpiresHeaders :: ServerMonad m => m Response -> m Response
- setContentType :: String -> Response -> Response
- setFilename :: String -> Response -> Response
- lookupIPAddr :: String -> IO (Maybe String)
- getHost :: ServerMonad m => m (Maybe String)
- compressedResponseFilter :: (FilterMonad Response m, MonadPlus m, WebMonad Response m, ServerMonad m) => m String

# Documentation

module Happstack.Server

withExpiresHeaders :: ServerMonad m => m Response -> m Response Source #

setContentType :: String -> Response -> Response Source #

setFilename :: String -> Response -> Response Source #

lookupIPAddr :: String -> IO (Maybe String) Source #

getHost :: ServerMonad m => m (Maybe String) Source #

compressedResponseFilter Source #

Arguments

:: (FilterMonad Response m, MonadPlus m, WebMonad Response m, ServerMonad m) |
=> m String | name of the encoding chosen

reads the `Accept-Encoding` header. Then, if possible will compress the response body with methods `gzip` or `deflate`.

This function uses `standardEncodingHandlers`. If you want to provide alternative handers (perhaps to change compression levels), see `compressedResponseFilter'`

    main =
      simpleHTTP nullConf $
         do str <- compressedResponseFilter
            return $ toResponse ("This response compressed using: " ++ str)