Mercurial Hosting > luan
comparison web/src/luan/modules/web/Web_server.luan @ 299:a74559240b4f
simplify PackageLuan and remove IO loading param
git-svn-id: https://luan-java.googlecode.com/svn/trunk@300 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 16 Dec 2014 06:24:49 +0000 |
parents | 899253043270 |
children | 9fb523472035 |
comparison
equal
deleted
inserted
replaced
298:2ce23c7e2342 | 299:a74559240b4f |
---|---|
71 end | 71 end |
72 | 72 |
73 function init(dir) | 73 function init(dir) |
74 dir = dir.gsub("/$","") -- remove trailing '/' if any | 74 dir = dir.gsub("/$","") -- remove trailing '/' if any |
75 Http.dir = dir | 75 Http.dir = dir |
76 function Io.schemes.site(path,loading) | 76 function Io.schemes.site(path) |
77 return Io.Uri( dir..path, loading ) | 77 return Io.Uri( dir..path ) |
78 end | 78 end |
79 authentication_handler.setPassword(private_password) | 79 authentication_handler.setPassword(private_password) |
80 local base = dir | 80 local base = dir |
81 if base.match("^classpath:") ~= nil then | 81 if base.match("^classpath:") ~= nil then |
82 base = dir.."#"..welcome_file.."#"..welcome_file..".luan" | 82 base = dir.."#"..welcome_file.."#"..welcome_file..".luan" |