changeset 1414:4abf88ec66de

add Http.is_serving
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 08 Oct 2019 12:17:31 -0600
parents 514b7a62fe27
children edfbcd7f8833
files src/luan/host/init.luan src/luan/modules/http/Http.luan src/luan/modules/http/Server.luan
diffstat 3 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/host/init.luan	Sun Oct 06 22:23:11 2019 -0600
+++ b/src/luan/host/init.luan	Tue Oct 08 12:17:31 2019 -0600
@@ -47,6 +47,7 @@
 Io.password = do_file(dir.."/info.luan").password or error()
 
 Http.dir = "file:"..dir.."/site"
+Http.is_serving = true
 
 function Io.schemes.site(path,loading)
 	return Io.uri( Http.dir..path, loading )
--- a/src/luan/modules/http/Http.luan	Sun Oct 06 22:23:11 2019 -0600
+++ b/src/luan/modules/http/Http.luan	Tue Oct 08 12:17:31 2019 -0600
@@ -176,4 +176,6 @@
 
 Http.domain = nil  -- set in domain specific cases
 
+Http.is_serving = false
+
 return Http
--- a/src/luan/modules/http/Server.luan	Sun Oct 06 22:23:11 2019 -0600
+++ b/src/luan/modules/http/Server.luan	Tue Oct 08 12:17:31 2019 -0600
@@ -36,6 +36,7 @@
 	end
 	dir = gsub(dir,"/$","")  -- remove trailing '/' if any
 	Http.dir = dir
+	Http.is_serving = true
 	function Io.schemes.site(path)
 		return uri( dir..path )
 	end