1 module Network.HTTP.Lucu.Config
3 , defaultConfig -- Config
7 import qualified Data.Map as M
11 import Network.HTTP.Lucu.MIMEType
12 import System.IO.Unsafe
15 data Config = Config {
16 cnfServerSoftware :: String
17 , cnfServerHost :: HostName
18 , cnfServerPort :: PortID
19 , cnfMaxPipelineDepth :: Int
20 , cnfMaxEntityLength :: Int
21 , cnfMaxURILength :: Int
22 , cnfExtToMIMEType :: Map String MIMEType
26 defaultConfig = Config {
27 cnfServerSoftware = "Lucu/1.0"
28 , cnfServerHost = unsafePerformIO getHostName
29 , cnfServerPort = Service "http"
30 , cnfMaxPipelineDepth = 100
31 , cnfMaxEntityLength = 16 * 1024 * 1024 -- 16 MiB
32 , cnfMaxURILength = 4 * 1024 -- 4 KiB
33 , cnfExtToMIMEType = undefined -- FIXME