X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FConfig.hs;h=4932a142ca095a62df2a26fe83394f877aa1980c;hp=2d37022d54072c6ec374d9aee909dfb765538f9c;hb=e624f0db8c4610b36da9e4463a656e0cb8a104dd;hpb=1e48e402adec79653203dc19a1800efa7b1c467b diff --git a/Network/HTTP/Lucu/Config.hs b/Network/HTTP/Lucu/Config.hs index 2d37022..4932a14 100644 --- a/Network/HTTP/Lucu/Config.hs +++ b/Network/HTTP/Lucu/Config.hs @@ -5,16 +5,22 @@ module Network.HTTP.Lucu.Config where import Network +import Network.BSD +import System.IO.Unsafe data Config = Config { - cnfServerPort :: PortID + cnfServerSoftware :: String + , cnfServerHost :: HostName + , cnfServerPort :: PortID , cnfMaxPipelineDepth :: Int - , cnfMaxEntityLength :: Integer + , cnfMaxEntityLength :: Int , cnfMaxURILength :: Int } 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