]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Config.hs
staticFile
[Lucu.git] / Network / HTTP / Lucu / Config.hs
index 4932a142ca095a62df2a26fe83394f877aa1980c..2f6335312b029d8e9eb8e561bf5291ee3bbbf16d 100644 (file)
@@ -4,24 +4,34 @@ module Network.HTTP.Lucu.Config
     )
     where
 
-import Network
-import Network.BSD
-import System.IO.Unsafe
+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 {
-      cnfServerSoftware   :: String
-    , cnfServerHost       :: HostName
-    , cnfServerPort       :: PortID
-    , cnfMaxPipelineDepth :: Int
-    , cnfMaxEntityLength  :: Int
-    , cnfMaxURILength     :: Int
+      cnfServerSoftware       :: String
+    , cnfServerHost           :: HostName
+    , cnfServerPort           :: PortID
+    , cnfMaxPipelineDepth     :: Int
+    , cnfMaxEntityLength      :: Int
+    , cnfMaxURILength         :: Int
+    , cnfMaxOutputChunkLength :: Int
+    , cnfExtToMIMEType        :: Map String MIMEType
     }
 
+
 defaultConfig = Config {
-                  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
+                  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
+                }