X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FConfig.hs;h=2f6335312b029d8e9eb8e561bf5291ee3bbbf16d;hb=a44a96d95b5fcbaf24a21c0336046ce0c3bab614;hp=919e1344a8950ad4f445a07cf3bc041f1d3c7fc6;hpb=9961a721f98b101825ef154a2122c1fc2fa6d1ac;p=Lucu.git diff --git a/Network/HTTP/Lucu/Config.hs b/Network/HTTP/Lucu/Config.hs index 919e134..2f63353 100644 --- a/Network/HTTP/Lucu/Config.hs +++ b/Network/HTTP/Lucu/Config.hs @@ -4,16 +4,34 @@ module Network.HTTP.Lucu.Config ) where -import Network +import qualified Data.Map as M +import Data.Map (Map) +import Network +import Network.BSD +import Network.HTTP.Lucu.MIMEType +import Network.HTTP.Lucu.MIMEType.DefaultExtensionMap +import System.IO.Unsafe + data Config = Config { - cnfServerPort :: PortID - , cnfMaxEntityLength :: Integer - , cnfMaxURILength :: Int + cnfServerSoftware :: String + , cnfServerHost :: HostName + , cnfServerPort :: PortID + , cnfMaxPipelineDepth :: Int + , cnfMaxEntityLength :: Int + , cnfMaxURILength :: Int + , cnfMaxOutputChunkLength :: Int + , cnfExtToMIMEType :: Map String MIMEType } + defaultConfig = Config { - cnfServerPort = Service "http" - , cnfMaxEntityLength = 16 * 1024 * 1024 -- 16 MiB - , cnfMaxURILength = 4 * 1024 -- 4 KiB - } \ No newline at end of file + cnfServerSoftware = "Lucu/1.0" + , cnfServerHost = unsafePerformIO getHostName + , cnfServerPort = Service "http" + , cnfMaxPipelineDepth = 100 + , cnfMaxEntityLength = 16 * 1024 * 1024 -- 16 MiB + , cnfMaxURILength = 4 * 1024 -- 4 KiB + , cnfMaxOutputChunkLength = 5 * 1024 * 1024 -- 5 MiB + , cnfExtToMIMEType = defaultExtensionMap + }