From 51ac19f565fa935eec6d9dd1f7119c6227383a3c Mon Sep 17 00:00:00 2001 From: Jacob Mitchell Date: Wed, 7 Sep 2016 13:19:13 -0700 Subject: HTTP Last-Modified: latest modtime of source files See issue #38. --- src/settings.sml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/settings.sml') 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; -- cgit v1.2.3