about summary refs log tree commit diff
path: root/src/Server.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2015-11-19T17·16+0100
committerVincent Ambo <tazjin@gmail.com>2015-11-19T17·16+0100
commit71b2ccd9275bacc789bce7f94d5792a24598460b (patch)
tree118a915094d1b755964ba0cf049d939c64d78f86 /src/Server.hs
parentf703c0391640c22e419094b6b27fbab993ef86a3 (diff)
Begin cleaning up old things
Diffstat (limited to 'src/Server.hs')
-rw-r--r--src/Server.hs19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/Server.hs b/src/Server.hs
index 85dc06e53690..b71b070f1b21 100644
--- a/src/Server.hs
+++ b/src/Server.hs
@@ -15,21 +15,12 @@ import           Data.Text                    (Text)
 import qualified Data.Text                    as T
 import           Data.Time
 import           Happstack.Server             hiding (Session)
-import           Happstack.Server.Compression
 
 import Blog
 import BlogDB  hiding (updateEntry)
 import Locales
 import RSS
 
-
-instance FromReqURI BlogLang where
-  fromReqURI sub =
-    case map toLower sub of
-      "de" -> Just DE
-      "en" -> Just EN
-      _    -> Nothing
-
 tmpPolicy :: BodyPolicy
 tmpPolicy = defaultBodyPolicy "/tmp" 0 200000 1000
 
@@ -39,13 +30,9 @@ runBlog acid port respath =
 
 tazBlog :: AcidState Blog -> String -> ServerPart Response
 tazBlog acid resDir = do
-    compr <- compressedResponseFilter
-    msum [ path $ \(lang :: BlogLang) -> blogHandler acid lang
-         , nullDir >> showIndex acid EN
-         , dir " " $ nullDir >>
-            seeOther ("https://plus.google.com/115916629925754851590" :: Text) (toResponse ())
+    msum [ nullDir >> blogHandler acid EN
+         , dir "de" $ blogHandler acid DE
          , path $ \(year :: Int) -> path $ \(month :: Int) -> path $ \(id_ :: String) -> formatOldLink year month id_
-         , dir "res" $ serveDirectory DisableBrowsing [] "../res"
          , dir "notice" $ ok $ toResponse showSiteNotice
          {- :Admin handlers -}
          , do dirs "admin/postentry" nullDir
@@ -75,7 +62,7 @@ tazBlog acid resDir = do
               setHeaderM "expires" "Tue, 20 Jan 2037 04:20:42 GMT"
               dir "static" $ serveDirectory DisableBrowsing [] resDir
          , serveDirectory DisableBrowsing [] resDir
-         , notFound $ toResponse $ showError NotFound DE
+         , notFound $ toResponse $ showError NotFound EN
          ]
 
 blogHandler :: AcidState Blog -> BlogLang -> ServerPart Response