)
where
-import Network
+import qualified Data.Map as M
+import Data.Map (Map)
+import Network
+import Network.BSD
+import Network.HTTP.Lucu.MIMEType
+import System.IO.Unsafe
+
data Config = Config {
- cnfServerPort :: PortID
+ cnfServerSoftware :: String
+ , cnfServerHost :: HostName
+ , cnfServerPort :: PortID
, cnfMaxPipelineDepth :: Int
- , cnfMaxEntityLength :: Integer
+ , cnfMaxEntityLength :: Int
, cnfMaxURILength :: Int
+ , cnfExtToMIMEType :: Map String MIMEType
}
+
defaultConfig = Config {
- cnfServerPort = Service "http"
+ cnfServerSoftware = "Lucu/1.0"
+ , cnfServerHost = unsafePerformIO getHostName
+ , cnfServerPort = Service "http"
, cnfMaxPipelineDepth = 100
, cnfMaxEntityLength = 16 * 1024 * 1024 -- 16 MiB
, cnfMaxURILength = 4 * 1024 -- 4 KiB
- }
\ No newline at end of file
+ , cnfExtToMIMEType = undefined -- FIXME
+ }