]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Config.hs
Many improvements
[Lucu.git] / Network / HTTP / Lucu / Config.hs
index 2d37022d54072c6ec374d9aee909dfb765538f9c..4932a142ca095a62df2a26fe83394f877aa1980c 100644 (file)
@@ -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