1
0
forked from GitHub/gf-core

gf -server: include list of loaded PGFs in version info

This commit is contained in:
hallgren
2014-05-12 13:45:36 +00:00
parent ca0c203877
commit 3c110cbe8d
3 changed files with 11 additions and 4 deletions

View File

@@ -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*