summaryrefslogtreecommitdiff
path: root/src/settings.sml
diff options
context:
space:
mode:
authorGravatar Jacob Mitchell <jmitchell@member.fsf.org>2016-09-07 13:19:13 -0700
committerGravatar Jacob Mitchell <jmitchell@member.fsf.org>2016-09-07 13:19:13 -0700
commit51ac19f565fa935eec6d9dd1f7119c6227383a3c (patch)
tree9539e4a61dd38f2e65d78a5805b3eadef26cfebf /src/settings.sml
parentc49ad46cc190e63f2395fcef03deff4386845877 (diff)
HTTP Last-Modified: latest modtime of source files
See issue #38.
Diffstat (limited to 'src/settings.sml')
-rw-r--r--src/settings.sml9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/settings.sml b/src/settings.sml
index b72789df..f4d399dc 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -844,7 +844,7 @@ fun noMime () =
fun readMimeTypes () =
let
- val inf = TextIO.openIn "/etc/mime.types"
+ val inf = FileIO.txtOpenIn "/etc/mime.types"
fun loop m =
case TextIO.inputLine inf of
@@ -914,7 +914,7 @@ fun addFile {Uri, LoadFromFilename} =
ErrorMsg.error ("Two different files requested for URI " ^ Uri ^ " ( " ^ path' ^ " vs. " ^ path ^ ")")
| NONE =>
let
- val inf = BinIO.openIn path
+ val inf = FileIO.binOpenIn path
in
files := SM.insert (!files,
Uri,
@@ -937,7 +937,7 @@ val jsFiles = ref (SM.empty : {Filename : string, Content : string} SM.map)
fun addJsFile LoadFromFilename =
let
val path = OS.Path.concat (!filePath, LoadFromFilename)
- val inf = TextIO.openIn path
+ val inf = FileIO.txtOpenIn path
in
jsFiles := SM.insert (!jsFiles,
path,
@@ -952,7 +952,8 @@ fun addJsFile LoadFromFilename =
fun listJsFiles () = SM.listItems (!jsFiles)
fun reset () =
- (urlPrefixFull := "/";
+ (Globals.setResetTime ();
+ urlPrefixFull := "/";
urlPrefix := "/";
urlPrePrefix := "";
timeout := 0;