summaryrefslogtreecommitdiff
path: root/src/compiler/GFServer.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-05-12 13:45:36 +0000
committerhallgren <hallgren@chalmers.se>2014-05-12 13:45:36 +0000
commit7c9ff164bf89b6f39da5ad2c43f7772324e1c141 (patch)
tree24fa537181f6a48274513b91d689c444a6570774 /src/compiler/GFServer.hs
parent12a8e113c2cc75e287677e8f0b3e30d364c612d5 (diff)
gf -server: include list of loaded PGFs in version info
Diffstat (limited to 'src/compiler/GFServer.hs')
-rw-r--r--src/compiler/GFServer.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs
index 049b60d26..f0c120b9c 100644
--- a/src/compiler/GFServer.hs
+++ b/src/compiler/GFServer.hs
@@ -18,7 +18,7 @@ import GF.System.Directory(doesDirectoryExist,doesFileExist,createDirectory,
import Data.Time (getCurrentTime,formatTime)
import System.Locale(defaultTimeLocale,rfc822DateFormat)
import System.FilePath(dropExtension,takeExtension,takeFileName,takeDirectory,
- (</>))
+ (</>),makeRelative)
#ifndef mingw32_HOST_OS
import System.Posix.Files(getSymbolicLinkStatus,isSymbolicLink,removeLink,
createSymbolicLink)
@@ -158,7 +158,9 @@ handle logLn documentroot state0 cache execute1 stateVar
-- "/stop" ->
-- "/start" ->
"/parse" -> parse (decoded qs)
- "/version" -> return (ok200 gf_version)
+ "/version" -> do (c1,c2) <- PS.listPGFCache cache
+ let rel = map (makeRelative documentroot)
+ return $ ok200 (unlines (gf_version:"":rel c1++"":rel c2))
"/flush" -> do PS.flushPGFCache cache; return (ok200 "flushed")
'/':rpath ->
-- This code runs without mutual exclusion, so it must *not*