]> gitweb @ CieloNegro.org - Lucu.git/blob - Network/HTTP/Lucu/Config.hs
Many improvements
[Lucu.git] / Network / HTTP / Lucu / Config.hs
1 module Network.HTTP.Lucu.Config
2     ( Config(..)
3     , defaultConfig -- Config
4     )
5     where
6
7 import Network
8 import Network.BSD
9 import System.IO.Unsafe
10
11 data Config = Config {
12       cnfServerSoftware   :: String
13     , cnfServerHost       :: HostName
14     , cnfServerPort       :: PortID
15     , cnfMaxPipelineDepth :: Int
16     , cnfMaxEntityLength  :: Int
17     , cnfMaxURILength     :: Int
18     }
19
20 defaultConfig = Config {
21                   cnfServerSoftware   = "Lucu/1.0"
22                 , cnfServerHost       = unsafePerformIO getHostName
23                 , cnfServerPort       = Service "http"
24                 , cnfMaxPipelineDepth = 100
25                 , cnfMaxEntityLength  = 16 * 1024 * 1024 -- 16 MiB
26                 , cnfMaxURILength     = 4 * 1024         -- 4 KiB
27                 }